Show More
@@ -92,7 +92,7 pypats = [ | |||
|
92 | 92 | (r'[\x80-\xff]', "non-ASCII character literal"), |
|
93 | 93 | (r'("\')\.format\(', "str.format() not available in Python 2.4"), |
|
94 | 94 | (r'^\s*with\s+', "with not available in Python 2.4"), |
|
95 | (r'(?<!def)\s+(any|all)\(', "any/all not available in Python 2.4"), | |
|
95 | (r'(?<!def)\s+(any|all|format)\(', "any/all/format not available in Python 2.4"), | |
|
96 | 96 | (r'if\s.*\selse', "if ... else form not available in Python 2.4"), |
|
97 | 97 | (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"), |
|
98 | 98 | # (r'\s\s=', "gratuitous whitespace before ="), |
@@ -26,6 +26,7 cat > non-py24.py <<EOF | |||
|
26 | 26 | # Using builtins that does not exist in Python 2.4 |
|
27 | 27 | if any(): |
|
28 | 28 | x = all() |
|
29 | y = format(x) | |
|
29 | 30 | |
|
30 | 31 | # Do not complain about our own definition |
|
31 | 32 | def any(x): |
@@ -13,7 +13,10 | |||
|
13 | 13 | missing whitespace in expression |
|
14 | 14 | ./non-py24.py:2: |
|
15 | 15 | > if any(): |
|
16 | any/all not available in Python 2.4 | |
|
16 | any/all/format not available in Python 2.4 | |
|
17 | 17 | ./non-py24.py:3: |
|
18 | 18 | > x = all() |
|
19 | any/all not available in Python 2.4 | |
|
19 | any/all/format not available in Python 2.4 | |
|
20 | ./non-py24.py:4: | |
|
21 | > y = format(x) | |
|
22 | any/all/format not available in Python 2.4 |
General Comments 0
You need to be logged in to leave comments.
Login now