Is this the only place where a non-class object with __bases__ is accepted? Or do we have more such? I recall that long ago you could use certain non-class objects as base classes.
I think all that hackery may predate (and may even have been an inspiration for features of) new-style classes. —Guido On Sat, Oct 3, 2020 at 03:12 Serhiy Storchaka <storch...@gmail.com> wrote: > 03.10.20 12:45, Steven D'Aprano пише: > > > On Sat, Oct 03, 2020 at 11:41:16AM +0300, Serhiy Storchaka wrote: > > >> issubclass() accept types (extension types and new-style classes), > > >> classic classes and arbitrary objects with the __bases__ attribute as > > >> its arguments. > > > > > > I didn't think classic classes were still possible in Python 3. How do > > > you get them? > > > > They were originally in Python 2.2.2 code when the support of objects > > with the __bases__ attribute was added. In Python 3 there are no classic > > classes, but some code was written to support them. > > _______________________________________________ > > Python-Dev mailing list -- python-dev@python.org > > To unsubscribe send an email to python-dev-le...@python.org > > https://mail.python.org/mailman3/lists/python-dev.python.org/ > > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/LWQTXQUGHTDCD7PU2RVW3VOQFOPSBEHP/ > > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- --Guido (mobile)
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/EAGYV55LGYU3GBSDNXQF6RDPUSPQKNBE/ Code of Conduct: http://python.org/psf/codeofconduct/