[issue38854] Decorator breaks inspect.getsource
PCManticore
report at bugs.python.org
Mon Nov 25 03:53:31 EST 2019
PCManticore <pcmanticore at gmail.com> added the comment:
Thanks for the report!
Turns out this was a bug in ``inspect.BlockFinder`` which is responsible for extracting out the source code from a given block. This class was considering ")" inside a decorator call as closing the decorator itself, even when the decorator call was accepting additional arguments that needed parentheses, such as function calls or tuples.
Just submitted a PR https://github.com/python/cpython/pull/17374 to address this issue.
----------
nosy: +Claudiu.Popa
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38854>
_______________________________________
More information about the Python-bugs-list
mailing list