how to add a value to a object in python code example Example: python object with attributes class Object(object): pass a = Object() a.somefield = somevalue