Python supports creating properties "on the fly", like so.
class MyClass:
def __init__(self):
pass
x = MyClass
x.new = 5
print(x.new) # prints 5
But this is a tad ugly. I have to have some instruction within the class, either a function or a class property definition.
But the main hindrance is this...
x.first.second = 1 # this will raise
And it raises because first doesn't exist, obviously. I would have to do something like this instead.
x.first = MyClass()
x.first.second = 1
print(x.first.second)
I want to recursively create properties as they're needed. Is this possible?