Home

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

previous
next

Re: Socket recv(1) seems to block instead of returning end of file.
Re: difference between libboost_regex-mt-gd-1_33_1.lib and boost_regex-mt-gd-1_33_1.lib
Re: Impersonate another user temporarily (Unix and Windows)
Re: List append
Re: need scsh in a wikip article
oprogramowanie
bjbeierde.com
instant loans
asg
kurs niemieckiego