[docs] [issue26052] pydoc for __init__ with not docstring

Antony Lee report at bugs.python.org
Fri Jan 8 18:30:08 EST 2016


New submission from Antony Lee:

For a class whose __init__ has no docstring, e.g.

    class C:
        def __init__(self, arg):
            pass

pydoc outputs

    <... cropped ...>
    class C(builtins.object)
     |  Methods defined here:
     |  
     |  __init__(self, arg)
     |      Initialize self.  See help(type(self)) for accurate signature.
    <... cropped ...>

The last part "See help(type(self)) for accurate signature." could arguably be cropped as the correct signature is already displayed (I see that this is the docstring of object.__init__, it's not clear to me why it needs this sentence.).

----------
assignee: docs at python
components: Documentation
messages: 257784
nosy: Antony.Lee, docs at python
priority: normal
severity: normal
status: open
title: pydoc for __init__ with not docstring
versions: Python 3.5, Python 3.6

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


More information about the docs mailing list