Optional parameter object re-used when instantiating multiple objects

Aaron Brady castironpi at gmail.com
Thu Nov 20 13:42:24 CET 2008

On Nov 19, 7:58 pm, alex23 <wuwe... at gmail.com> wrote:
> On Nov 20, 10:14 am, Aaron Brady <castiro... at gmail.com> wrote:
> > If you had a menu in a browser interface that had the items, say,
> > 'Stop' and 'Reload', what would you expect to happen if you clicked on
> > them?
> If you had a keyword called 'def', which defined functions, would you
> expect it to define said functions when it executed, or on each
> function call?

At first, I would expect it to define them at compile-time.  Then,
when I learned there was no such thing, I would expect it to define
them at execute-time.  What does that have to do with evaluating a
default argument?

More information about the Python-list mailing list