[issue34635] inspect: add tools for inspecting subclasses

2018-09-13 Thread Benjamin Mintz
Change by Benjamin Mintz : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue34635] inspect: add tools for inspecting subclasses

2018-09-13 Thread Petr Viktorin
Petr Viktorin 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

[issue34635] inspect: add tools for inspecting subclasses

2018-09-13 Thread Benjamin Mintz
Benjamin Mintz added the comment: I didn't have one in mind. I just noticed that there was a getmro which accessed __mro__ but no corresponding method for __subclasses__. That got me getsubclasses and getallsubclasses. Then I thought it would be cool if you could walk the tree of subclasses

[issue34635] inspect: add tools for inspecting subclasses

2018-09-13 Thread Petr Viktorin
Petr Viktorin added the comment: What's the use case for these? -- nosy: +petr.viktorin ___ Python tracker ___ ___

[issue34635] inspect: add tools for inspecting subclasses

2018-09-11 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34635] inspect: add tools for inspecting subclasses

2018-09-11 Thread Benjamin Mintz
Change by Benjamin Mintz : -- keywords: +patch pull_requests: +8623 stage: -> patch review ___ Python tracker ___ ___

[issue34635] inspect: add tools for inspecting subclasses

2018-09-11 Thread Benjamin Mintz
New submission from Benjamin Mintz : Adds inspect.getsubclasses, inspect.getallsubclasses (recursive), and inspect.getsubclasstree (recursive, maintains structure). See documentation for more details. -- components: Library (Lib) messages: 325068 nosy: bmintz priority: normal