[Python-Dev] PEP 318 bake-off?
Phillip J. Eby
pje at telecommunity.com
Thu Apr 1 11:26:00 EST 2004
At 09:44 PM 3/31/04 -0800, Guido van Rossum wrote:
>What I'm asking (especially of Phillip) is to collect a set of
>realistic method declarations using decorators; we can then
>collectively format these using any of the possible syntaxes, and see
>how they look.
I'd be happy to scrounge up some samples from existing code using
'property' and 'classmethod' as well as some of PEAK's decorators, and I
definitely think that Jack Diedrich and Bob Ippolito's samples should be
included as well.
Important question, though: do we include code bodies, or just use 'pass'
for the bodies? If we include the body, how much of the body? Should we
include entire classes, especially if the class itself needs a decorator,
and multiple methods have decorators?
Next, does anybody have any actual use cases for attribute decoration
today? We're probably not going to get a lot of that from current code
samples. I can make up some examples that throw in every possible option
that PEAK provides in order to get some "lots of decoration" samples, but
they wouldn't be "real" uses in that case. But I guess that maybe Bob's
examples might be wordy enough.
More information about the Python-Dev
mailing list