-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Thanks for a useful library!
astunparse doesn't special case docstrings:
>>> print(astunparse.unparse(ast.parse('''def f(): """multi\n line\n docstring\n """ ''')))
def f():
'multi\n line\n docstring\n '
whereas Python 3.9 handles it more idiomatically:
>>> print(ast.unparse(ast.parse('''def f(): """multi\n line\n docstring\n """ ''')))
def f():
"""multi
line
docstring
"""
Note the implementation in Python 3.9 also handles other issues, like #38, better.
More generally, I was wondering if there's a plan to attempt to use the Python 3.9 implementation. Let me know if this is something you want and if you would want help!
Metadata
Metadata
Assignees
Labels
No labels