General Question
I'm trying to write a function that behaves differently based on the type of the schemas. E.g.
schema Parent:
a: int
schema Child(Parent):
b: int
schema GrandChild(Child):
b = 2
schema foo[s: any]:
output: int
if isinstance(s, Child):
output = s.b
else:
output = s.a
bar = foo(GrandChild{})
The build in typeof() function doesn't work because it doesn't expose inheritance chain.
Any suggested would be appreciated.