Scoping "bug" ?
Penfold
spam at spam.com
Mon Aug 21 17:06:10 EDT 2000
Kevin Bailey <noone at nowhere.com> wrote in message
news:39A18EDD.33C70A2C at nowhere.com...
> Alex Martelli wrote:
> >
> > The determination of what namespace[s] to look up a binding in
> > is done at compile-time. The actual look up is done at run-time.
>
> Fair enough. Then the "compiler" should be more than capable of
> giving a warning that the variable may be used before being
> bound.
The "global" namespace is a rather dynamic object --- there is no way the
compiler can *ever* know what is
in it. Thus, no warning can be given that an "unbound" variable is being
used --- unless of course you want every single reference
to variables in the global namespace to issue such a warning ... which might
be considered pointless.
Des.
More information about the Python-list
mailing list