adding and retrieving dynamic attributes of classes in python