Author nikitakit
Recipients Claudiu.Popa, Naddiseo, eric.araujo, ned.deily, nikitakit, zorceta
Date 2015-10-12.06:33:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444631614.11.0.946176474156.issue12920@psf.upfronthosting.co.za>
In-reply-to
Content
I just ran into this issue trying to introspect an IPython session, in which case the __main__ module doesn't have a file associated with it.

But it turns out that methods defined in a class do have source code associated with them, so it's possible to add a workaround for the common case where a class actually has methods.

Code: https://gist.github.com/nikitakit/642cb96febdf2f812d0b
History
Date User Action Args
2015-10-12 06:33:34nikitakitsetrecipients: + nikitakit, ned.deily, eric.araujo, Claudiu.Popa, Naddiseo, zorceta
2015-10-12 06:33:34nikitakitsetmessageid: <1444631614.11.0.946176474156.issue12920@psf.upfronthosting.co.za>
2015-10-12 06:33:34nikitakitlinkissue12920 messages
2015-10-12 06:33:33nikitakitcreate