Assignment operator?

Jeremy Hylton jeremy at alum.mit.edu
Fri Apr 19 13:08:12 EDT 2002


"Ante Bagaric" <abagaric_NOSPAM at rest-art.hr> wrote in message news:<a9mpq4$940c$1 at as201.hinet.hr>...
> Hmm, and the compiler doesn't know in advance what object a name references,
> so it has no choice but to flag '+=' as rebinding operation even if it is
> not
> the case. It doesn't sound nice, but I admit there's no obvious alternative
> that
> comes to mind. This whole namespace and local/global issue has an aura of
> 'unfinishness' around it :)

Well, I'm not really sure what 'unfinishness' means.  You didn't mean
un-Finnishnes, right?

The namespace rules in Python are unusual, perhaps unique, because
there are no declarations (except the global statement).  As a
consequence, assignment and other name-binsding operations play an
important role in determining scope.

Jeremy



More information about the Python-list mailing list