[issue21814] object.__setattr__ or super(...).__setattr__?

2014-06-20 Thread Vincent Besanceney
New submission from Vincent Besanceney: In: https://docs.python.org/2.7/reference/datamodel.html#customizing-attribute-access Regarding the description of __setattr__ method: "For new-style classes, rather than accessing the instance dictionary, it should call the base class method wit

[issue21814] object.__setattr__ or super(...).__setattr__?

2014-06-21 Thread Vincent Besanceney
Vincent Besanceney added the comment: If I understand it right, in a simple case like this: class Foo(object): def __setattr__(self, name, value): # some logic, then... super(Foo, self).__setattr__(name, value) calling super is equivalent to calling object.__setattr__, but