Code evaluation at function definition execution time (was Re: Compile time evaluation (aka eliminating default argument hacks))

Steven Bethard steven.bethard at gmail.com
Fri Feb 25 21:34:53 EST 2005


Nick Coghlan wrote:
> Anyway, if others agree that the ability to execute a suite at def 
> exeuction time to preinitialise a function's locals without resorting to 
> bytecode hacks is worth having, finding a decent syntax is the next 
> trick :)

I'm not certain how many use cases really require a full suite, though 
being able to define default values for function locals in the same way 
that default values can be defined for function arguments would be nice.

Worth looking at is the thread:

http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/58f53fe8bcc49664/

STeVe



More information about the Python-list mailing list