Ivan Pozdeev <ivan_pozd...@mail.ru> added the comment:

I got that part, thank you.

I can't get 1)what you're expecting as an output and 2)why this should work the 
way you're suggesting 'cuz functions and classes are very different.

In particular, classes can be modified dynamically, unlike functions. So if you 
just print out the lines from the file with the definition (which is what 
getsource() does), it may not be what the interpreter is actually using.

----------

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

Reply via email to