[New-bugs-announce] [issue35619] Support custom data descriptors in pydoc

Serhiy Storchaka report at bugs.python.org
Sun Dec 30 12:48:44 EST 2018


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Currently pydoc supports only limited set of data descriptors: builtin member and getset descriptors (this covers slot descriptors and structseq member descriptors) and properties. But it does not fully support custom data descriptors.

For example, after implementing accelerators for namedtuple fileds access in issue32492, if P = namedtuple('P', 'x y'), help(P.x) will output the help for the _tuplegetter class instead of the P.x member.

The proposed PR replaces checks for particular types of data descriptors with a general check. It performs also some refactoring and adds a bunch of tests.

----------
components: Library (Lib)
messages: 332753
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Support custom data descriptors in pydoc
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35619>
_______________________________________


More information about the New-bugs-announce mailing list