Language Semantics: @ symbol??

Alex Martelli aleax at mail.comcast.net
Mon Jan 30 00:56:46 CET 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