On Fri, Jun 14, 2019 at 12:39 PM Steven D'Aprano <st...@pearwood.info> wrote: > and no simple way to talk about *strict* subclass and superclass > relationships without a verbose compound test: > > assert issubclass(parent, child) and child != parent
Well, why not go further then and make the following thing to be a strict check? `Parent >> Child` Which is `True` when and only when `Child` is a direct subclass of `Parent`. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/TN7EPGDXGS6B4H7XXMYO36HRQYYWTBVC/ Code of Conduct: http://python.org/psf/codeofconduct/