Message77525
I think I understand. This simple code does not compile with python 3.0:
def f():
e = None
def g():
e
try:
pass
except Exception as e:
pass # SyntaxError here???
The reason is that since 3.0, a "del e" statement is generated by the
compiler (see http://www.python.org/dev/peps/pep-3110/#semantic-changes)
and this conflicts with the first block of the function.
This issue is much more complicated than it seemed...
A solution could be to generate "e=None" instead of "del e". |
|
Date |
User |
Action |
Args |
2008-12-10 09:43:57 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, benjamin.peterson, marduk |
2008-12-10 09:43:57 | amaury.forgeotdarc | set | messageid: <1228902237.68.0.861378090902.issue4613@psf.upfronthosting.co.za> |
2008-12-10 09:43:57 | amaury.forgeotdarc | link | issue4613 messages |
2008-12-10 09:43:56 | amaury.forgeotdarc | create | |
|