What's up with rebinding assignment?

Ulrich Petri ulope at gmx.de
Fri Mar 21 14:24:07 CET 2003

"Beni Cherniavsky" <cben at techunix.technion.ac.il> schrieb im Newsbeitrag
news:mailman.1048248875.10571.python-list at python.org...
> Once upon a time, Just threw in a great (IMHO ;-) idea on pytohn-dev:
> http://mail.python.org/pipermail/python-dev/2003-February/032764.html
> The idea was to add am ``:=`` rebinding operator, one that changes a
> visible binding without making it local to the current scope::
> [ snipped horrible language abuse ]
> My question is: is there a chance this will make it into Python?
> Nobody seems to have noticed it...  Will a PEP help?

The following is strictly IMHO:
I dont think such an ugly hack will ever make it into python.

If you need to change a varibale from a higher scope, you most likely have a
serious design flaw in your program. At the moment i can think of no
situation where this would be needed. And if there really is such a case you
can allways define the variable global.

just my 2 eurocents

Ciao Ulrich

More information about the Python-list mailing list