Nick Coghlan wrote:
Basically, yeah. Although I later realised I got the name of the feature I want wrong - default arguments are evaluated when the def statement is executed, not when the code is compiled. So it's a matter of being able to execute some code in the functions local namespace at compile time.

D'oh - "definition execution time", not compile time.

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to