evaluated function defaults: stored where?

David Isaac aisaac0 at verizon.net
Wed May 25 23:33:32 EDT 2005


Default parameter values are evaluated once when the function definition is
executed.
Where are they stored?  (A guess: in a dictionary local to the function.)
Where is this documented?

As a Python newbie I found this behavior quite surprising.
Is it common in many other languages?
Is it unsurprising if I look at it right?

Thanks,
Alan Isaac





More information about the Python-list mailing list