[issue5244] Python 3.0 eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
New submission from Jiafei Peng : Jiafei Peng added the comment: Yes it does work properly outside listcomps. canBusType = 'CANdiag' result1 = eval('canBusType') result2 = [eval('canBusType'), eval('canBusType'),

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
Jiafei Peng added the comment: Yes it does work properly outside listcomps. canBusType = 'CANdiag' result1 = eval('canBusType') result2 = [eval('canBusType'), eval('canBusType'), eval( 'canBusType')]

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
Jiafei Peng added the comment: Hallo Mr. Fürstenau, thank you for the quick response. Have you tried it with Python 3.0 The Error report is truely: NameError: name 'canBusType' is not defined Someone else reported the same problem in internet too. Best regards, mit freundlic

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
New submission from Jiafei Peng : 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 Pytho