PEP-0318
Mark Bottjer
mark_bottjer at hotmail.com
Fri Aug 6 20:26:38 EDT 2004
Roy Smith wrote:
> Mark Bottjer <mark_bottjer at hotmail.com> wrote:
>> * 0 Perhaps decorators should be allowed before or after the
>> docstring. If you have to choose, I'd choose making it before
>> the docstring.
>
> It's a pretty arbitrary decision (i.e. I can't see any strong arguments
> one way or the other) which means it's the kind of thing which is likely
> to not be remembered. I think I'm with you, decorators come first, then
> the docstring. But pick one and stick with it, so everybody does it the
> same way.
I agree that it is arbitrary. I horked the text from one of the other
sections, as I thought that it applied here as well.
>> * - Lots of decorators will make it harder to find the start of the
>> function implementation. Then again, so will a large docstring.
>
> Do people anticipate having lots of decorators for a given function?
The way they've been talking, it would appear so. I'm routinely hearing
a bunch of different things people want to use this syntax for:
staticmethod/classmethod, argument type assertion, DBC, synchronization,
metadata such as author, and framework callback registration, just to
name a few.
-- Mark
More information about the Python-list
mailing list