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 flox
Recipients alex, flox, hynek, josmiley, r.david.murray, westley.martinez
Date 2012-06-01.15:39:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338565195.79.0.978025848198.issue14972@psf.upfronthosting.co.za>
In-reply-to
Content
This is a duplicate of issue 11796.

See also issue 13557:
http://bugs.python.org/issue13557#msg154174

For Python 3, a list comprehension defines a block pretty much like the method definition during the class creation:

class x:
    x = 1
    def incx():
        return x + 1
    print(incx())

 ==> raises NameError too
History
Date User Action Args
2012-06-01 15:39:55floxsetrecipients: + flox, alex, r.david.murray, westley.martinez, josmiley, hynek
2012-06-01 15:39:55floxsetmessageid: <1338565195.79.0.978025848198.issue14972@psf.upfronthosting.co.za>
2012-06-01 15:39:55floxlinkissue14972 messages
2012-06-01 15:39:54floxcreate