contrib/check-code.py
branchstable
changeset 11522 eaa7666ad53f
parent 11345 4b81f82b03e3
child 11568 d5d4e6a30613
child 11599 6fcc066c0c2c
--- a/contrib/check-code.py	Fri Jul 09 11:04:00 2010 +0200
+++ b/contrib/check-code.py	Fri Jul 09 14:01:55 2010 +0200
@@ -94,6 +94,8 @@
     (r'^\s*with\s+', "with not available in Python 2.4"),
     (r'(?<!def)\s+(any|all|format)\(',
      "any/all/format not available in Python 2.4"),
+    (r'(?<!def)\s+(callable)\(',
+     "callable not available in Python 3, use hasattr(f, '__call__')"),
     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
     (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"),
 #    (r'\s\s=', "gratuitous whitespace before ="),