> > Does the function that contains the exec also contain another function > > or lambda? If it does and the contained function has references to > > non-local variables, the compiler will complain. > > It appears this is the problem. The fact that only "__init__.py" was listed > threw me - I have a few of them :) > > *sigh* - this is a real shame. IMO, we can't continue to break existing > code, even if it is good for me! People are going to get mighty annoyed - I > am. And if people on python-dev struggle with some of the new errors, the > poor normal users are going to feel even more alienated. Sigh indeed. We could narrow it down to only raise the error if there are nested functions or lambdas that don't reference free variables, but unfortunately most of them will reference at least some builtin e.g. str()... How about the old fallback to using straight dict lookups when this combination of features is detected? --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4