A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043613.html below:

[Python-Dev] method decorators

[Python-Dev] method decoratorsDamien Morton dmorton at bitfurnace.com
Sun Mar 28 12:09:42 EST 2004
Has anyone proposed the current c-sharp syntax for method decorators?
That is, the decorators appears before the method delcaration? Seems to
me eminently more readable than trying to squeeze the decorators into
the main part of the method declaration, especially so if the decorator
declaration gets long.

[decorator]
def method(args):
   body

[foo, bar, baz, fubar, blah, blah, blah]
def method(args):
   body

With decorators and attributes and a docstring, youd have something like
this:

[foo, bar, baz, fubar, blah, blah, blah]
def method(args):
   { author:"guido", version:2.1, purpose:"illustrative" }
   """ docstring """
   body


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4