diff contrib/check-code.py @ 11343:f325db39c8b9

check-code: catch format(), introduced in Python 2.6
author Martin Geisler <mg@aragost.com>
date Tue, 15 Jun 2010 09:55:59 +0200
parents 920a783e5f91
children 4b81f82b03e3
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Jun 15 09:53:50 2010 +0200
+++ b/contrib/check-code.py	Tue Jun 15 09:55:59 2010 +0200
@@ -92,7 +92,7 @@
     (r'[\x80-\xff]', "non-ASCII character literal"),
     (r'("\')\.format\(', "str.format() not available in Python 2.4"),
     (r'^\s*with\s+', "with not available in Python 2.4"),
-    (r'(?<!def)\s+(any|all)\(', "any/all not available in Python 2.4"),
+    (r'(?<!def)\s+(any|all|format)\(', "any/all/format not available in Python 2.4"),
     (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 ="),