Carl Friedrich Bolz-Tereick <cfb...@gmx.de> added the comment:
hm, I think I figured it out. The root cause is that even though the creation of the class Triffid fails, it can still be found via Animal.__subclasses__(), which the special subclass logic for ABCs is looking at. Triffid fills its _abc_impl data with some content, but Triffid._abc_impl was never successfully initialized, therefore it mutates the _abc_impl of its first base class Animal. My conclusion would be that if a class is not successfully created, it shouldn't appear in the .__subclasses__() list of its bases. See attached script for some illuminating prints. ---------- nosy: +Carl.Friedrich.Bolz Added file: https://bugs.python.org/file50515/x.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38085> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com