[Python-ideas] Assignment decorators (Re: The Descriptor Protocol...)

Paul Moore p.f.moore at gmail.com
Thu Mar 10 12:20:45 CET 2011

On 10 March 2011 01:37, MRAB <python at mrabarnett.plus.com> wrote:
>> I don't like the suggestion as written, but I quite like it as a
>> superior syntax proposal for PEP 359.
>> def (builder) name(param_spec):
>>     code_block
> I think what I don't like is that the name is buried in the middle of
> the line and not near the start as in the "class" or "def" statement.

Syntactically, I have the same concern - when I first read that line I
didn't spot "name" at all. But I like the semantics - it strikes me as
something that could have a lot of different uses (rather than being
solely focused on letting property classes know the names they are
bound to, which is where this started).

So I'm +1 on the semantics, and happy to suggest alternative colours
for the bikeshed :-)


More information about the Python-ideas mailing list