Implementation of the global statement
Michael Hudson
mwh at python.net
Thu Nov 28 05:08:37 EST 2002
hungjunglu at yahoo.com (Hung Jung Lu) writes:
> Michael Hudson <mwh at python.net> wrote in message news:<7h3adjvqgs4.fsf at pc150.maths.bris.ac.uk>...
> > hungjunglu at yahoo.com (Hung Jung Lu) writes:
> > > The global statement as in
> > > ...
> > > is a directive to the parser.
> >
> > Well, compiler, really.
>
> From Guido's Python Language Reference Manual, Section 6.13 The global
> statement:
>
> "... Programmer's note: the global is a directive to the parser. It
> applies only to code parsed at the same time as the global statement.
> ..."
Just evidence that Guido isn't infallible :)
It's the compiler. After all, it's the compiler that has to decide
whether to emit a LOAD_GLOBAL or a LOAD_FAST...
Cheers,
M.
--
All programs evolve until they can send email. -- Richard Letts
Except Microsoft Exchange. -- Art
-- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html
More information about the Python-list
mailing list