Brett Cannon added the comment:

So I have a use case for this actually. =)

http://bugs.python.org/issue17621 is about trying to finally add a lazy mixin 
to importlib so people stop asking for it. I have a version already written 
externally at 
https://code.google.com/p/importers/source/browse/importers/lazy.py. Part of 
the trick of making it work is having a way to drop the lazy mixin from the 
loader MRO for all future uses (which is important for reloads) is to assign 
__loader__ to super(Mixin, self). The problem is that if you use isinstance on 
that loader with any of the ABCs in importlib.abc it will always come back 
false no matter whether the interface is actually implemented or not.

While I consider it a marginal thing for people to do (importlib.abc is for 
making sure people implement the right methods and providing default 
implementations, not for interface checking), I'm sure someone will do it and I 
would like one less possible warning in any future docs about this lazy mixin 
regarding isinstance checks.

----------
priority: normal -> low

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18275>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to