[Types-sig] type declaration syntax
Guido van Rossum
guido@CNRI.Reston.VA.US
Thu, 23 Dec 1999 13:08:55 -0500
[John Skaller]
> CPython does not lexically scope function bodies
I'm not sure what you mean by lexically scoped here, since in my
opinion Python functions *are* lexically scoped -- however the scopes
don't nest like they do in Pascal etc. (The opposite of lexical
scoping is dynamic scoping, which is emphatically *not* used in Python
-- variables bound in outer stack frames don't affect a function's
use of variable names.)
> default arguments _are_ lexically scoped.
I'm not sure what you mean here either. Defaults are evaluated in the
containing scope. I'm not sure how that makes them any more lexically
scoped.
--Guido van Rossum (home page: http://www.python.org/~guido/)