this is decorator, this is how it's may be implented
>>> def returns(t):
... def dec(f):
... def wrapped(*args, **kwargs):
... ret = f(*args, **kwargs)
... assert type(ret) is t
... return ret
... return wrapp
[EMAIL PROTECTED] wrote:
> Hi,
>
> I am new to Python, here I'd like to have a question: I noticed a
> special way to call a function in a program:
>
> @function_name
>
> No argv is passed, even though the function_name asks for one. Any idea
> what this @something syntax is trying to achieve.