This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ivan.Pozdeev
Recipients Ivan.Pozdeev, t-vi
Date 2018-06-15.19:54:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529092460.05.0.56676864532.issue33826@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-06-15 19:54:20Ivan.Pozdeevsetrecipients: + Ivan.Pozdeev, t-vi
2018-06-15 19:54:20Ivan.Pozdeevsetmessageid: <1529092460.05.0.56676864532.issue33826@psf.upfronthosting.co.za>
2018-06-15 19:54:20Ivan.Pozdeevlinkissue33826 messages
2018-06-15 19:54:20Ivan.Pozdeevcreate