Language Semantics: @ symbol??

Alex Martelli aleax at mail.comcast.net
Sun Jan 29 18:56:46 EST 2006


Enigma Curry <workbee at gmail.com> wrote:
   ...
> @somefunction()
> def a_newfunction():
>     ....
> 
> What does it mean and what does it do?

It means and does exactly the same thing as having

a_newfunction = somefunction()(a_newfunction)

right after the end of a_newfunction's body.

<http://www.python.org/doc/current/whatsnew/node6.html>


Alex



More information about the Python-list mailing list