How would I properly do the following in python?
class AnyType:
def __init__(self, Type:Union[PrimitiveType, ComplexType]):
self.Type = Type
class PrimitiveType(AnyType):
def __init__(self, Type):
super().__init__(Type)
class NestedType(AnyType):
def __init__(self, Type):
super().__init__(Type)
NameError: name 'PrimitiveType' is not defined
I know in C there is a forward declaration but how do I prevent the following circular reference in python?