[issue40257] Improve the use of __doc__ in pydoc

Karthikeyan Singaravelan report at bugs.python.org
Mon May 11 00:35:54 EDT 2020


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

https://bugs.python.org/issue40587 has been opened. Copy paste of the report as below : 


In python 3.8:

```
>>> class A(object):
...     """standard docstring"""
...     pass
...
>>> import inspect
>>> inspect.getdoc(A())
'standard docstring'
```

In 3.9:

```
$ python
Python 3.9.0a6+ (heads/master:5b956ca42d, May 10 2020, 20:31:26)
[Clang 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class A(object):
KeyboardInterrupt
>>> class A(object):
...     """standard docstring"""
...     pass
...
>>> import inspect
>>> inspect.getdoc(A())
>>>
```

----------
nosy: +xtreak

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


More information about the Python-bugs-list mailing list