I do apologize if this question is already answered on SO or if my problem could be solved by a simple Google search, but I don t know the terminology to describe it, other than the question title, which didn t turn up any results.
Because I don t know the terminology, the best I can do is give an example of what I want.
class MyClassProperty(): def __init__(self): # somehow access MyObject class pass class MyObject(): var = MyClassProperty()
MyClassProperty will not only need to reference the MyObject class, otherwise it would be simple. The end goal is to be able to automatically add methods and variables to the MyObject class when a MyClassProperty is instantiated at class level.
I have seen frameworks and libraries do this before, the one that first comes to mind is Kivy, with its properties.
Thanks for any help you can give, even if the extent of that help is to tell me this is impossible.