Code evaluation at function definition execution time (was Re: Compile time evaluation (aka eliminating default argument hacks))
Nick Coghlan
ncoghlan at iinet.net.au
Fri Feb 25 21:04:38 EST 2005
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 | ncoghlan at email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
More information about the Python-list
mailing list