This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, benjamin.peterson, marduk
Date 2008-12-10.09:43:55
SpamBayes Score 9.496236e-05
Marked as misclassified No
Message-id <1228902237.68.0.861378090902.issue4613@psf.upfronthosting.co.za>
In-reply-to
Content
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".
History
Date User Action Args
2008-12-10 09:43:57amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, benjamin.peterson, marduk
2008-12-10 09:43:57amaury.forgeotdarcsetmessageid: <1228902237.68.0.861378090902.issue4613@psf.upfronthosting.co.za>
2008-12-10 09:43:57amaury.forgeotdarclinkissue4613 messages
2008-12-10 09:43:56amaury.forgeotdarccreate