]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Backport rev 2.143 (note: some earlier bugfix candidates still TBD).
authorGuido van Rossum <guido@python.org>
Thu, 18 Apr 2002 00:36:17 +0000 (00:36 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 18 Apr 2002 00:36:17 +0000 (00:36 +0000)
commit95c168cf68b0310b2ee00bf96b7902c59355c90f
tree5a8cd83330390602666047a355b216448a1ac435
parentca547d47e304ffc288afe2cfe4f896428058d153
Backport rev 2.143 (note: some earlier bugfix candidates still TBD).

SF bug 542984.

Change type_get_doc (the get function for __doc__) to look in tp_dict
more often, and if it finds a descriptor in tp_dict, to call it (with
a NULL instance).  This means you can add a __doc__ descriptor to a
new-style class that returns instance docs when called on an instance,
and class docs when called on a class -- or the same docs in either
case, but lazily computed.

I'll also check this into the 2.2 maintenance branch.
Objects/typeobject.c