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/043567.html below:

[Python-Dev] method decorators (PEP 318)

[Python-Dev] method decorators (PEP 318) [Python-Dev] method decorators (PEP 318)Russell Finn rfinn at opnet.com
Fri Mar 26 17:01:57 EST 2004
Mike Rovner wrote:
> Given that attributes are part of function object dictionary,
> and defined at function definition time like docstring,
> why not:
>
> def func(atr):
>   {author="Guido", deprecated=True}
>   '''doc'''
>   pass

I came up with nearly the same idea after reading Guido's original 
post, except that I recommend using the existing dictionary literal 
syntax:

def func (args):
     { author: "Guido", deprecated: True}
     '''doc'''
     pass

Perhaps this was just a typo in Mike's post.

-- Russell

-- 
Russell S. Finn
Principal Software Engineer, Software Architecture and Design
OPNET Technologies, Inc.


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