New submission from Jiafei Peng <jiafei.p...@iav.de>: eval() function in List Comprehension doesn't work. please see the under codes:
canBusType = 'CANdiag' result = [eval('canBusType') for i in range(3)] NameError: name 'canBusType' is not defined It did work in Python2.5 or 2.6. The expected result is ['CANdiag', 'CANdiag', 'CANdiag']. ---------- messages: 81890 nosy: JiafeiPeng severity: normal status: open title: eval() function in List Comprehension doesn't work versions: Python 3.0 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5242> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com