What means @ in python ?usually called "at sign" in english.
In this script for exemple (this script return an error in my konsole...)in your example, "f1(arg)" and "f2" are decorators. the above is
@f1(arg)
@f2
def func(): pass
I see several script where used this symbol but I can't understand.
equivalent to writing
def func():
pass
func = f1(arg)(f2(func))
that is, define a function, and then pass it to the function "f2", and
then to the function that's returned by calling "f1(arg)". the final
value of the "func" variable is whatever the decorators returned.
the decorator functions (f2 and whatever f1(arg) returns) can manipulate
the function being defined, or even replace it with something else.
specification:
http://www.python.org/dev/peps/pep-0318/
some (semi-advanced) articles:
http://www.ibm.com/developerworks/li...l-cpdecor.html
http://www.phyast.pitt.edu/~micheles...mentation.html
</F>