[Python-Dev] replacing 'global'

Just van Rossum just at letterror.com
Sun Oct 26 10:54:30 EST 2003


Samuele Pedroni wrote:

> >But: let's not get carried away with this particular spelling, the
> >main question is: "is it a good idea to have a rebinding assignment
> >operator?" (regardless of how that operator is spelled). Needless to
> >say, I think it is.
> 
> would you mind trying to express why? everybody is spending a lot of
> mental energy trying to figure a out a sensible way to achieve this
> but only Guido has made explicit some 3rd party reasons to want it. I
> would like to read more rationales about why we need it so badly.

My question above is misleading with respect to my personal feelings
about the issue. It should have been:

"""*If* we decide we need to be able to assign to names in outer scopes,
would it be a good idea to add a rebinding operator?"""

I actually don't care much whether the cability is added or not, but
*if* we add it, I'd much rather see a rebinding operator than an
extension to the global statement or a new declarative statement.

Just



More information about the Python-Dev mailing list