decorator J4 - any objections?
Paul Rubin
http
Fri Aug 20 14:44:00 EDT 2004
JimJJewett at yahoo.com (Jim Jewett) writes:
> <URL: http://www.python.org/moin/PythonDecorators > (section 5.21 J4)
>
> looks very good to me -- and it is the only alternative without negatives.
>
> def func(arg1, arg2)
> @version("Added in 2.4")
> @returns(None)
> as:
> """Docstring could be here, or in decorator part above"""
> # body goes here
What was wrong with using . or - instead of @ ? Given that this is
new syntax, just about any character could work. Or what about no
special punctuation at all? Using @ makes me cringe somewhat.
Also, why the need for the "as" keyword? What happens if it's just
eliminated? I.e.:
def func(arg1, arg2)
@version("Added in 2.4")
@returns(None):
"""Docstring could be here, or in decorator part above"""
# body goes here
More information about the Python-list
mailing list