diff contrib/check-code.py @ 11764:16723af520b0

check-code: added a check for calls to the builtin cmp function
author Renato Cunha <renatoc@gmail.com>
date Sat, 07 Aug 2010 16:13:53 -0300
parents dad185761392
children e1359ad582f6
line wrap: on
line diff
--- a/contrib/check-code.py	Sat Aug 07 16:12:51 2010 -0300
+++ b/contrib/check-code.py	Sat Aug 07 16:13:53 2010 -0300
@@ -74,6 +74,7 @@
      "tuple parameter unpacking not available in Python 3+"),
     (r'lambda\s*\(.*,.*\)',
      "tuple parameter unpacking not available in Python 3+"),
+    (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"),
     (r'\breduce\s*\(.*', "reduce is not available in Python 3+"),
     (r'\.has_key\b', "dict.has_key is not available in Python 3+"),
     (r'^\s*\t', "don't use tabs"),