Show More
@@ -26,6 +26,23 b'' | |||
|
26 | 26 | > # Do not complain about our own definition |
|
27 | 27 | > def any(x): |
|
28 | 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 | 46 | > EOF |
|
30 | 47 | $ cat > classstyle.py <<EOF |
|
31 | 48 | > class newstyle_class(object): |
@@ -64,6 +81,9 b'' | |||
|
64 | 81 | ./non-py24.py:4: |
|
65 | 82 | > y = format(x) |
|
66 | 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 | 87 | ./classstyle.py:4: |
|
68 | 88 | > class oldstyle_class: |
|
69 | 89 | old-style class, use class foo(object) |
General Comments 0
You need to be logged in to leave comments.
Login now