>> > Note that Jeremy is only raising errors for "from M import *". >> >> No, he says he's also raising errors for 'import spam' if 'spam' is declared >> global, like so: >> >> def viking(): >> global spam >> import spam > >Yeah, this was just brought to my attention at our group meeting >today. I'm with you on this one -- there really isn't a good reason >why this shouldn't work. (I wonder why that constraint was ever added >to the reference manual; maybe I was just upset that someone would >*do* something as ugly as that, or maybe there was a J[P]ython >reason???.) Previously Jython have had problems with "from .. import *" in function scope, and still have problems when used with the python -> java compiler: http://sourceforge.net/bugs/?func=detailbug&bug_id=122834&group_id=12867 Using global on an import name is currently ignored by Jython because the name assignment is done by the runtime, not the compiler. regards, finn
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