[issue18275] Make isinstance() work with super type instances

Antoine Pitrou report at bugs.python.org
Fri Jun 21 17:11:22 CEST 2013


Antoine Pitrou added the comment:

> I'm attracted to the idea of making a loader lazy by simply doing
> something
> like ``class LazySourceFileLoader(LazyMixin, SourceFileLoader):
> ...``.

But then you have to make a specific Lazy subclass for each delegated
loader implementation. With a proxy class you would simply proxy each
loader instance:

existing_loader = SourceFileLoader(...)
lazy_loader = LazyLoader(existing_loader)
...

----------

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


More information about the Python-bugs-list mailing list