[issue31401] Dynamic compilation that uses function in comprehension fails when compiled inside function

2017-09-09 Thread Jose Cambronero
Jose Cambronero added the comment: Woops, sorry about that, makes sense. Below an example (same idea as the files): ``` Python 3.6.2 (default, Sep 9 2017, 13:27:06) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin Type "help", "copyright", "credi

[issue31401] Dynamic compilation that uses function in comprehension fails when compiled inside function

2017-09-08 Thread Jose Cambronero
New submission from Jose Cambronero: 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