homepage

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 eric.araujo
Recipients Claudiu.Popa, Naddiseo, docs@python, eric.araujo
Date 2013年03月25日.02:54:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1364180087.37.0.0216439452602.issue12920@psf.upfronthosting.co.za>
In-reply-to
Content
> It seems to work perfectly on command line though.
If the code is saved in a file, yes, but not in an interactive interpreter. This is not actually related to IDLE, but to the fact that inspect.getsource merely finds the __file__ attribute of the module object for its argument. If a module object has no file, the error message indicates that it’s a built-in module (like sys), but this fails to take into account the special __main__ module in an interactive interpreter.
It might be worth it to improve the error message, and in any case the documentation can be improved.
History
Date User Action Args
2013年03月25日 02:54:47eric.araujosetrecipients: + eric.araujo, docs@python, Claudiu.Popa, Naddiseo
2013年03月25日 02:54:47eric.araujosetmessageid: <1364180087.37.0.0216439452602.issue12920@psf.upfronthosting.co.za>
2013年03月25日 02:54:47eric.araujolinkissue12920 messages
2013年03月25日 02:54:47eric.araujocreate

AltStyle によって変換されたページ (->オリジナル) /