You will have infinite recursion if you try to use self.__dict__[key] , since self.__dict__ will call __getattr__ , etc. etc. Of course, you can exit this loop if you use object.__getattr__(self,key) , but this only works for new style classes. There is no general mechanism that you could use with old style classes.
Note that you do not have this problem with __setattr__ , because in this case, you can directly use self.__dict__ (hence asymmetry).
mgilson
source share