[issue27989] incomplete signature with help function using typing

Ivan Levkivskyi report at bugs.python.org
Sat Oct 22 10:05:28 EDT 2016


Ivan Levkivskyi added the comment:

Here is the patch according to the discussion (modifying inspect).

I didn't change the rendering of docs for classes (neither stripped 'typing.' nor changed __bases__ to __orig_bases__). First, collections.abc.X are widely used as base classes, so that plain Mapping could be confused with collections.abc.Mapping. Second, seeing the actual runtime type-erased bases suggests that one should use isinstance() and issubclass() with those (not with, e.g.,  Mapping[int, str], the latter will raise TypeError).

----------
keywords: +patch
nosy: +yselivanov
Added file: http://bugs.python.org/file45188/typing-pydoc.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27989>
_______________________________________


More information about the Python-bugs-list mailing list