A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-July/036881.html below:

[Python-Dev] DeprecationWarning: assignment shadows builtin

[Python-Dev] DeprecationWarning: assignment shadows builtin [Python-Dev] DeprecationWarning: assignment shadows builtinSamuele Pedroni pedronis@bluewin.ch
Wed, 16 Jul 2003 22:30:35 +0200
At 12:52 16.07.2003 -0700, Neil Schemenauer wrote:
> > Does the DeprecationWarning mean that I cannot provide this intuitive
> > interface anymore?
>
>That was not the intention.  Having module globals that shadow builtins
>is okay.  The warning is supposed to be triggered if the scope of a name
>is changed from builtin to global at runtime.  Eg:
>
>     import string
>     string.str = 'ha ha'
>
>That's a strange thing to do and I suspect there is little code out
>there that does it.  Unfortunately the code that tries to detect it is
>imperfect.


I seriously think that the code triggering the warning should be backed off,
I discussed about the warning/global speedup issue with Guido at 
Europython, I didn't propose there to back it off, and we didn't finish, 
still it was more or less clear that there is no strong case at the moment 
for the warning, because it is unclear whether is the right kind of flavor 
of limitation in terms of having a simple explanation for it, the issue 
with __init__ modules is still unclear etc...

regards. 




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