Sometimes a programmer gets an idea to make his/her work easier by creating magically working code that uses setattr() and getattr() functions to set some variable. While this may look like a good idea, because there is no need to write all the methods by hand, you are asking for trouble down the road.

Consider the following code. You have some data and want to update the class with all of the data. Of course you don’t want to do this by hand, especially if there are tons of items in data_dict. However, when refactoring this kind of code after several years, and you’d like to know where some variable is added to this class, you’d usually use grep or ack_grep to find it. But when setting variables/methods/functions like this, you’re screwed.