A desperate lunge for on-topic-ness

Ian Kelly ian.g.kelly at gmail.com
Tue Oct 23 12:50:11 EDT 2012


On Mon, Oct 22, 2012 at 7:39 PM, Dennis Lee Bieber
<wlfraed at ix.netcom.com> wrote:
> On Mon, 22 Oct 2012 16:02:34 -0600, Ian Kelly <ian.g.kelly at gmail.com>
> declaimed the following in gmane.comp.python.general:
>
>> On my wishlist for Python is a big, fat SyntaxError for any variable
>> that could be interpreted as either local or nonlocal and is not
>> explicitly declared as either.  It would eliminate this sort of
>> confusion entirely and make code that shadows nonlocal variables much
>> more readable.
>>
>         Which now makes code dependent upon changes to some imported modules
> if someone is foolish enough to use the
>
>         from xyz import *
>
> notation...

It's already a SyntaxError to use a wildcard import anywhere other
than the module level, so its use can only affect global variables.



More information about the Python-list mailing list