On 3/12/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Thanks for a great example of what decorators are good for.
Anna
Danny has given some reasons why this is not useful standard behaviour.
If this is a behaviour you need for many functions, you could create a
decorator that provides it so you don't have to include the same
boilerplate in each function.
Decorators are functions that accept a function as an argument and
return a new function as a result. Here is a decorator that will unpack
a tuple argument:
Thanks for a great example of what decorators are good for.
Anna
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor