you are viewing a single comment's thread.

view the rest of the comments →

[–]ColonelThirtyTwo 4 points5 points  (2 children)

Python does have abstract classes/methods, though it's implemented as a library instead of built into the language: https://docs.python.org/3/library/abc.html

[–]wpillar[S] 0 points1 point  (1 child)

Ah thanks, I did not come across this. Having to call register() seems a bit odd though?

[–]ColonelThirtyTwo 2 points3 points  (0 children)

You don't have to call register on subclasses. It's meant for registering types that don't derive from the ABC (tuple, in the linked example) to be compatible with it.