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