[Python-Dev] Re: method decorators (PEP 318)
Phillip J. Eby
pje at telecommunity.com
Mon Mar 29 09:23:52 EST 2004
At 06:27 PM 3/28/04 -0500, Robert Mollitor wrote:
>
>> Robert> ... there is a trivial workaround if we restrict the transformer
>> Robert> list to identifiers:
>>
>> Robert> sync = synchronized(lockattr="baz")
>> Robert> def func [sync] (arg1, arg2):
>> Robert> pass
>>
>>I think restricting decorators to only be identifiers would be shortsighted.
>>I can understand having to create workarounds for unforseen situations, but
>>it's clear at this point in the discussion that decorator functions might
>>need to accept parameters. Why not let them?
>
>It is easier to expand a public grammar than it is to shrink one.
And it's better to cripple a syntax extension in order to justify making a
second syntax extension that's a crufty workaround for the crippling? That
doesn't make any sense to me.
More information about the Python-Dev
mailing list