contrib/check-code.py
changeset 20688 a61ed1c2d7a7
parent 20598 e57e2da803aa
child 20796 131f7fe06e9e
--- a/contrib/check-code.py	Wed Mar 12 13:29:29 2014 -0400
+++ b/contrib/check-code.py	Wed Mar 12 13:31:27 2014 -0400
@@ -200,6 +200,8 @@
      'use "import foo.bar" on its own line instead.'),
     (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"),
     (r'\breduce\s*\(.*', "reduce is not available in Python 3+"),
+    (r'dict\(.*=', 'dict() is different in Py2 and 3 and is slower than {}',
+     'dict-from-generator'),
     (r'\.has_key\b', "dict.has_key is not available in Python 3+"),
     (r'\s<>\s', '<> operator is not available in Python 3+, use !='),
     (r'^\s*\t', "don't use tabs"),