Thanks!
I had no clue what that was (and searching for @ in the context of
python was returning hundreds of thousands of hits XD)
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> What's with code that has the @ symbol in front of classes or
> functions? This has probably already been asked but I can't find any
> info on it.
http://www.python.org/doc/2.4.2/whatsnew/node6.html
--
http://mail.python.org/mailman/listinfo/python-list
Oh please, please, can I answer!
They are decorators.
Check-out http://zephyrfalcon.org/weblog2/arch_e10_00610.html#e610
(decorate this),
or http://paddy3118.blogspot.com/ " Python function attributes" and
then " Function Attributes assigned by decorator".
Of course there is also:
http://wiki.pyt
Oh please, please, can I answer!
They are decorators.
Check-out http://zephyrfalcon.org/weblog2/arch_e10_00610.html#e610
(decorate this),
or http://paddy3118.blogspot.com/ " Python function attributes" and
then " Function Attributes assigned by decorator".
Of course there is also:
http://wiki.pyt
What's with code that has the @ symbol in front of classes or
functions? This has probably already been asked but I can't find any
info on it.
Here is a slice of code I found that uses this, can someone please
explain what the @'s for??
::
def option_error_decorator(func):
def wrapper(*a, **