docstring that use globals?

Chris Rebert clp2 at rebertia.com
Sat Oct 16 13:14:47 EDT 2010


On Sat, Oct 16, 2010 at 10:05 AM, kj <no.email at please.post> wrote:
> In <i9clfa$mk7$1 at reader1.panix.com> kj <no.email at please.post> writes:
>
>>MRAB, Peter: thanks for the decorator idea!
>
>
> As an afterthought, is there any way to extend this general idea
> to other docstrings beyond function docstrings?
>
> I imagine that the decorator idea works well for method docstrings
> too (though I have not tried any of this yet).
>
> But, IIRC, decorators don't work for classes

PEP 3129: Class Decorators
http://www.python.org/dev/peps/pep-3129/

It was approved and seems to have been backported to at least v2.6.6.

Cheers,
Chris



More information about the Python-list mailing list