[Python-Dev] Re: method decorators (PEP 318) (original) (raw)
Barry Warsaw barry at python.org
Sat Mar 27 15:05:59 EST 2004
- Previous message: [Python-Dev] Re: method decorators (PEP 318)
- Next message: [Python-Dev] method decorators (PEP 318)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 2004-03-27 at 06:03, Paul Moore wrote:
"Mike Rovner" <mike at nospam.com> writes:
> 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 > > Presumably {attributes} will be like "doc": only allowed immediately after > def (interchangebly with "doc") and do no harm in other places. I quite like this (although it ought to be a real dictionary literal, ie {'author': 'Guido', 'deprecated': True}, which doesn't read quite as well.
Not advocating this syntax one way or the other, but just pointing out that if it is allowed, we have to allow either the docstring or the attr dict in either order.
But I still think this is a separate issue from PEP 318.
Me too. -Barry
- Previous message: [Python-Dev] Re: method decorators (PEP 318)
- Next message: [Python-Dev] method decorators (PEP 318)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]