[Python-Dev] replacing 'global'

Walter Dörwald walter at livinglogic.de
Mon Oct 27 12:42:40 EST 2003


Neal Norwitz wrote:

> On Mon, Oct 27, 2003 at 07:11:16AM -0800, Guido van Rossum wrote:
> 
>>Hah.  Another argument *against* rebinding by :=, and *for* a nonlocal
>>declaration.  With 'nonlocal n, m' in increment() (or however it's
>>spelled :-) the intent is clear.
> 
> 
> I dislike := very much.  I think it will confuse newbies and thus be
> abused.  While I dislike the global declaration, I don't feel strongly
> about changing or removing it.

I think ':=' is to close to '='. The default assigment should be much
easier to type than the special case. Otherwise I'd have to think about
which one I'd like to use every time I type an assigment.

Bye,
    Walter Dörwald





More information about the Python-Dev mailing list