[issue34635] inspect: add tools for inspecting subclasses
Petr Viktorin
report at bugs.python.org
Thu Sep 13 23:34:53 EDT 2018
Petr Viktorin <encukou at gmail.com> added the comment:
__subclasses__ is, as Tim Peters put it [0], "just Python exposing an
internal mechanism for the morbidly curious".
I'd expect that not all alternative implementations of Python have something like __subclasses__ -- it's a detail of the implementation (as opposed to the MRO, which is something any implementation of the Python language needs to be able to compute).
It certainly is cool functionality, but keep in mind we'd have to support it for decades, and it would put pressure on other Python implementations to add something like __subclasses__.
With that in mind, and because there's no real use case, I think it's better to not add this to inspect.
[0] https://mail.python.org/pipermail/python-list/2003-August/210297.html
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34635>
_______________________________________
More information about the Python-bugs-list
mailing list