You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2020-11-22.11:53:56.680>created_at=<Date2020-11-21.10:19:14.565>labels= ['expert-C-API', 'type-feature', '3.10']
title='Support passing single class to PyType_FromSpecWithBases and PyType_FromModuleAndSpec'updated_at=<Date2020-11-22.11:53:56.680>user='https://github.com/serhiy-storchaka'
It is common that class have a single base class. PyType_FromModuleAndSpec() is only called with NULL as bases (that means inheriting object) in the stdlib, and PyType_FromSpecWithBases() is called with a 1-tuple as bases all three times (not counting tests).
Since it is a common case, PyErr_NewException() accept both a tuple and a single class as the base argument. I propose to accept a single class also in PyType_FromSpecWithBases() and PyType_FromModuleAndSpec().