A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-January/012375.html below:

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

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.108,1.109Finn Bock bckfnn@worldonline.dk
Wed, 31 Jan 2001 13:35:36 GMT
On Wed, 31 Jan 2001 13:59:14 +0100, you wrote:

>On Wed, Jan 31, 2001 at 12:49:22PM +0000, Finn Bock wrote:
>
>> Using global on an import name is currently ignored by Jython because
>> the name assignment is done by the runtime, not the compiler.
>
>So it's impossible to do, in Jython, something like:
>
>def fillme():
>    global me
>    import me
>
>but it is possible to do:
>
>def fillme():
>    global me
>    import me as _me
>    me = _me
>
>?

Yes, only the second example will make a global variable.

> I have to say I don't like that; we're always claiming 'import' (and
>'def' and 'class' for that matter) are 'just another way of writing
>assignment'. All these special cases break that.

I don't like it either, I was only reported what jython currently does.
The current design used by Jython does lend itself directly towards a
solution, but I don't see anything that makes it impossible to solve.

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