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 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 ---------- files: reproduce.zip messages: 301734 nosy: jpc priority: normal severity: normal status: open title: Dynamic compilation that uses function in comprehension fails when compiled inside function type: compile error versions: Python 3.6 Added file: https://bugs.python.org/file47127/reproduce.zip _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31401> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com