[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.108,1.109

Finn Bock bckfnn@worldonline.dk
Wed, 31 Jan 2001 12:49:22 GMT

>> > 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

Previously Jython have had problems with "from .. import *" in function
scope, and still have problems when used with the python -> java


Using global on an import name is currently ignored by Jython because
the name assignment is done by the runtime, not the compiler.