Aivar Annamaa added the comment:

Looks like I misinderstood inspect.findsource. I thought it is supposed to give 
only the code for argument object (eg. only def code when given a function), 
but looks like it is giving the whole file.

Unfortunately inspect.findsource is not documented in 
https://docs.python.org/3/library/inspect.html and inspect.getsource can't be 
used as replacement, because it doesn't work with modules.

----------
stage:  -> resolved
status: open -> closed
versions: +Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28121>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to