Message190143
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. |
|
Date |
User |
Action |
Args |
2013-05-27 15:03:43 | brett.cannon | set | recipients:
+ brett.cannon, ncoghlan, eric.snow |
2013-05-27 15:03:42 | brett.cannon | set | messageid: <1369667022.96.0.117125531861.issue18072@psf.upfronthosting.co.za> |
2013-05-27 15:03:42 | brett.cannon | link | issue18072 messages |
2013-05-27 15:03:42 | brett.cannon | create | |
|