In python how can we create a new object without having a predefined Class and later dynamically add properties to it ?
example:
dynamic_object = Dynami
One way that I found is also by creating a lambda. It can have sideeffects and comes with some properties that are not wanted. Just posting for the interest.
dynamic_object = lambda:expando dynamic_object.dynamic_property_a = "abc" dynamic_object.dynamic_property_b = "abcdefg"