Most classes won't care, but sometimes it's needed for the metaclass machinery. The underlying type() builtin didn't accept those until Python 3.8. I'm pretty sure I wrote deftype before that, but it seems incomplete now. Somehow, I must have missed it in the "What's new in Python" changelog.
This will go in the bases tuple, obviously. That's where the equivalent goes in the class statement. I think I'll just parse everything after a : as kwds pairs. Similar to attach, so it won't support the :? placeholders for bases after the :.
Most classes won't care, but sometimes it's needed for the metaclass machinery. The underlying
type()
builtin didn't accept those until Python 3.8. I'm pretty sure I wrotedeftype
before that, but it seems incomplete now. Somehow, I must have missed it in the "What's new in Python" changelog.This will go in the bases tuple, obviously. That's where the equivalent goes in the class statement. I think I'll just parse everything after a
:
as kwds pairs. Similar toattach
, so it won't support the:?
placeholders for bases after the:
.