[Python-Dev] q about default args

Guido van Rossum guido@python.org
Fri, 23 Aug 2002 09:29:55 -0400

> Stepan Koltsov <yozh@mx1.ru>:
> > The question is: To be or^H^H^H^H^H^H^H^H^H Why not evaluate default
> > parameters of a function at THE function call, not at function def
> > (as is done currenly)? For example, C++ (a nice language, isn't it? ;-)
> > ) evaluates default parameters at function call.
> Among other things, because that choice (what old LISP hackers like me
> call `dynamic scoping') turns out to be far more difficult to model
> mentally than Python's lexical scoping.   Forty years of LISP experience
> says Python does the right thing.

Dynamic scoping has nothing to do with it.

Nevertheless, there's no chance in hell this will ever change, so
let's drop the subject.

--Guido van Rossum (home page: http://www.python.org/~guido/)