[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

Jakub Wilk report at bugs.python.org
Thu Feb 23 16:50:11 EST 2017


New submission from Jakub Wilk:

With git master (4c78c527d215c37472145152cb0e95f196cdddc9) I get this:

>>> import ast
>>> ast.get_docstring(ast.parse(''))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jwilk/opt/lib/python3.7/ast.py", line 203, in get_docstring
    text = inspect.cleandoc(text)
  File "/home/jwilk/opt/lib/python3.7/inspect.py", line 590, in cleandoc
    lines = doc.expandtabs().split('\n')
AttributeError: 'NoneType' object has no attribute 'expandtabs'

----------
messages: 288488
nosy: inada.naoki, jwilk
priority: normal
severity: normal
status: open
title: ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'
type: behavior
versions: Python 3.7

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


More information about the Python-bugs-list mailing list