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 brett.cannon
Recipients brett.cannon, eric.snow, ncoghlan
Date 2013-05-27.15:03:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369667022.96.0.117125531861.issue18072@psf.upfronthosting.co.za>
In-reply-to
Content
I'm contemplating adding an implementation of importlib.abc.InspectLoader.get_code() which relies on get_source() (and then another version in ExecutionLoader which uses get_filename()). The reason I'm hesitant is get_source() is often an expensive operation thanks to having to decode the source code and do a universal newline conversion.

Now I could add the implementation but leave the method abstract, forcing users to make the decision to call super().get_code(), although that's still easy enough that I'm afraid people still won't take into consideration the performance implications.

But maybe I'm worrying too much? We're consenting adults, right? So for that reason I'm leaning towards implementing but leaving abstract with a note in the docs that performance should be considered before just blindly calling the abstract method.
History
Date User Action Args
2013-05-27 15:03:43brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow
2013-05-27 15:03:42brett.cannonsetmessageid: <1369667022.96.0.117125531861.issue18072@psf.upfronthosting.co.za>
2013-05-27 15:03:42brett.cannonlinkissue18072 messages
2013-05-27 15:03:42brett.cannoncreate