Author yesheng
Recipients yesheng
Date 2018-11-19.06:24:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542608659.0.0.788709270274.issue35273@psf.upfronthosting.co.za>
In-reply-to
Content
def yyy():
    a, b = 'abc', 'abd'
    print([eval(i) for i in ('a', 'b')])


def zzz():
    a, b = 'abc', 'abd'
    print({i: eval(i) for i in ('a', 'b')})


yyy()  # ok
zzz()  # NameError: name 'a' is not defined, however in yyy() it is ok
History
Date User Action Args
2018-11-19 06:24:19yeshengsetrecipients: + yesheng
2018-11-19 06:24:19yeshengsetmessageid: <1542608659.0.0.788709270274.issue35273@psf.upfronthosting.co.za>
2018-11-19 06:24:18yeshenglinkissue35273 messages
2018-11-19 06:24:18yeshengcreate