Message301734
Execution fails with NameError when trying to dynamically compile a Python program that uses a function in a comprehension, and the code is compiled inside a function call, rather than as a global statement.
Using the attached files to reproduce (in reproduce.zip):
python3 compile_in_function.py comprehension.py #fails
python3 compile_global.py comprehension.py # works
python2 compile_in_function.py comprehension.py #works with Python 2.7.12 |
|
Date |
User |
Action |
Args |
2017-09-08 21:19:38 | jpc | set | recipients:
+ jpc |
2017-09-08 21:19:38 | jpc | set | messageid: <1504905578.93.0.552234464993.issue31401@psf.upfronthosting.co.za> |
2017-09-08 21:19:38 | jpc | link | issue31401 messages |
2017-09-08 21:19:38 | jpc | create | |
|