On Sat, 11 Aug 2007 20:30:54 +0200, Helmut Jarausch wrote:
> are decorators more than just syntactic sugar in python 2.x and what
> about python 3k ?
They are just syntactic sugar.
@spam
def ham():
pass
is the same as
def ham():
pass
ham = spam(ham)
> How can I find out the predefined decorators?
*The* predefined decorators? Decorators are just functions after all.
There are some meant to be used as decorators but there are also
"ordinary" functions that may make sense as decorators.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list