In Python 3.3+ you can use SimpleNamespace, which does exactly what you’re looking for:
from types import SimpleNamespace
obj = SimpleNamespace()
obj.airspeed = 42
https://docs.python.org/3.4/library/types.html#types.SimpleNamespace
In Python 3.3+ you can use SimpleNamespace, which does exactly what you’re looking for:
from types import SimpleNamespace
obj = SimpleNamespace()
obj.airspeed = 42
https://docs.python.org/3.4/library/types.html#types.SimpleNamespace