[Python-Dev] Re: closure semantics
aleaxit at yahoo.com
Fri Oct 24 16:48:32 EDT 2003
On Friday 24 October 2003 12:06 am, Guido van Rossum wrote:
> > Given that the global keyword or something like it is here to stay
> > (being preferable over some attribute-style access)
> (Actually I expect more pushback from Alex once he's back from his
> trip. He seems to feel strongly about this. :-)
I do: I dislike "declarative statements" and I also dislike "global" as
a spelling for anything that isn't actually global. But after a 3-day
whirl I'm just too bushed -- and have too many hundreds of msgs
to go through (backwards as usual) -- to be very effective;-). With
luck, I may be able to do better in the weekend...:-).
> That was my first suggestion earlier this week. The main downside
> (except from propagating 'global' :-) is that if you rename the
> function defining the scope you have to fix all global statements
> referring to it.
I seem to have seen many others say that the "renaming the function"
downside is not a serious problem, and I concur with them; you're just
as likely to rename e.g. the variable (where you have to hunt down and
change every assignment and access as well as the "declarative stmt",
AND get no compiler support for errors) as the function (where you only
need to fix the "declarative stmts" AND the compiler will tell you if you
More information about the Python-Dev