[issue18072] Add an implementation of importlib.abc.InspectLoader.get_code

Brett Cannon report at bugs.python.org
Tue May 28 01:36:53 CEST 2013


Brett Cannon added the comment:

So it turns out I will simply have to make the methods not abstract anymore. Thanks to multiple inheritance I can't implement the method in ExecutionLoader and keep it abstract in case someone subclasses InspectLoader and then creates another subclass of ExecutionLoader and the InspectLoader subclass w/o making ExecutionLoader.get_code not abstract. But if I can't do it there then it seems silly to leave only InspectLoader.get_code abstract.

IOW get_code will not longer be abstract and I will leave a note in the docs to mention you probably want to consider overriding the method for performance.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18072>
_______________________________________


More information about the Python-bugs-list mailing list