changeset 11568:d5d4e6a30613

check-code: check for tuple parameter unpacking (missing in py3k)
author Renato Cunha <renatoc@gmail.com>
date Wed, 14 Jul 2010 23:15:00 -0300
parents 34cc8b84407f
children f8576644a222
files contrib/check-code.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Wed Jul 14 23:03:21 2010 -0300
+++ b/contrib/check-code.py	Wed Jul 14 23:15:00 2010 -0300
@@ -70,6 +70,10 @@
 ]
 
 pypats = [
+    (r'^\s*def\s*\w+\s*\(.*,\s*\(',
+     "tuple parameter unpacking not available in Python 3+"),
+    (r'lambda\s*\(.*,.*\)',
+     "tuple parameter unpacking not available in Python 3+"),
     (r'^\s*\t', "don't use tabs"),
     (r'\S;\s*\n', "semicolon"),
     (r'\w,\w', "missing whitespace after ,"),