Using setattr() in python
问题 I am looking for someone to explain the basics of how to use, and not use setattr() . My problem arose trying to use one class method/function to return data that is then put in another method/function. Perhaps a simpler approach would be much better in this case, but I'm trying to understand how classes work/are used. This problem seems to hinge on setattr() , and this is my attempt to make a fairly simple use of this. Though it's not quite the same problem, I was following Python The Hard