19 Apr
2022
19 Apr
'22
12:14 a.m.
If all of the classes in the union derive from the same base class, you can use the base class for the `isinstance` check or case statement.
You're not wrong, but I would consider it quite annoying to have to import both Coin and BaseCoin in order to use this ADT. Conceptually, they are the same thing split into two. If this became standard, I think Python would be the first programming language in which the base class of an ADT and the type of the ADT were distinct names and objects.