Closed cclauss closed 5 years ago
I'll be merging this promptly.
I had to further fix this up since the patch still didn't pass the test case I gave on the prior PR:
$ ./cmake/targets_to_cmake_lists.py .
File "./cmake/targets_to_cmake_lists.py", line 166
exec(s, fn_locals)
SyntaxError: unqualified exec is not allowed in function 'parse_targets' it contains a nested function with free variables
@snarkmaster merged this pull request in facebook/bistro@4fe8870da81a6b94fd9bec2a55368c9d070943a0.
Legacy exec statements are syntax errors in Python 3 but exec() function works as expected in both Python 2 and Python 3.
This PR attempts to solve a corner case described in https://github.com/facebook/bistro/pull/34#issuecomment-513992204 where having a dict comprehension inside an exec() function call can be problematic.
@snarkmaster