commit | d99b3e78dd3160124816fb77e59af1f1682a2472 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Apr 18 00:27:33 2002 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Apr 18 00:27:33 2002 +0000 |
tree | 19c38c606aab849c68d2c93632beb7cf5dff3b30 | |
parent | 6ca7d41c1f0f2f6ef654f3ff6241c80cccf06ab3 [diff] |
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.