Show More
@@ -26,6 +26,23 b'' | |||||
26 | > # Do not complain about our own definition |
|
26 | > # Do not complain about our own definition | |
27 | > def any(x): |
|
27 | > def any(x): | |
28 | > pass |
|
28 | > pass | |
|
29 | > | |||
|
30 | > # try/except/finally block does not exist in Python 2.4 | |||
|
31 | > try: | |||
|
32 | > pass | |||
|
33 | > except StandardError, inst: | |||
|
34 | > pass | |||
|
35 | > finally: | |||
|
36 | > pass | |||
|
37 | > | |||
|
38 | > # nested try/finally+try/except is allowed | |||
|
39 | > try: | |||
|
40 | > try: | |||
|
41 | > pass | |||
|
42 | > except StandardError, inst: | |||
|
43 | > pass | |||
|
44 | > finally: | |||
|
45 | > pass | |||
29 | > EOF |
|
46 | > EOF | |
30 | $ cat > classstyle.py <<EOF |
|
47 | $ cat > classstyle.py <<EOF | |
31 | > class newstyle_class(object): |
|
48 | > class newstyle_class(object): | |
@@ -64,6 +81,9 b'' | |||||
64 | ./non-py24.py:4: |
|
81 | ./non-py24.py:4: | |
65 | > y = format(x) |
|
82 | > y = format(x) | |
66 | any/all/format not available in Python 2.4 |
|
83 | any/all/format not available in Python 2.4 | |
|
84 | ./non-py24.py:11: | |||
|
85 | > try: | |||
|
86 | no try/except/finally in Py2.4 | |||
67 | ./classstyle.py:4: |
|
87 | ./classstyle.py:4: | |
68 | > class oldstyle_class: |
|
88 | > class oldstyle_class: | |
69 | old-style class, use class foo(object) |
|
89 | old-style class, use class foo(object) |
General Comments 0
You need to be logged in to leave comments.
Login now