0

what's the relationship between the built-in function 'setattr()' and 'object.__setattr__()'? Is the built-in function "getattr(obj,attr)" totally equal to obj.attr?

Jay
  • 113
  • 8
  • 1
    check this https://stackoverflow.com/questions/43739608/how-different-is-type-setattr-from-object-setattr – Daniyal Syed Jun 15 '17 at 06:04
  • regarding getattr: https://stackoverflow.com/questions/3278077/difference-between-getattr-vs-getattribute – emulbreh Jun 15 '17 at 06:06
  • Did you read [the docs](https://docs.python.org/3/reference/datamodel.html#data-model) regarding these methods? If yes, tell us what you didn't understand. Otherwise people will be basically explaining the same here. – Ashwini Chaudhary Jun 15 '17 at 06:07
  • Possible duplicate of [Difference between \_\_getattr\_\_ vs \_\_getattribute\_\_](https://stackoverflow.com/questions/3278077/difference-between-getattr-vs-getattribute) – Hara Jun 15 '17 at 06:17

0 Answers0