[New-bugs-announce] [issue40587] [regression] inspect.getdoc not returning docstring.
Matthias Bussonnier
report at bugs.python.org
Sun May 10 23:56:20 EDT 2020
New submission from Matthias Bussonnier <bussonniermatthias at gmail.com>:
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())
>>>
```
----------
messages: 368603
nosy: mbussonn
priority: normal
severity: normal
status: open
title: [regression] inspect.getdoc not returning docstring.
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40587>
_______________________________________
More information about the New-bugs-announce
mailing list