[docs] [issue21814] object.__setattr__ or super(...).__setattr__?
Raymond Hettinger
report at bugs.python.org
Sat Jun 21 18:18:47 CEST 2014
Raymond Hettinger added the comment:
> If I understand it right, in a simple case like this:
...
> calling super is equivalent to calling object.__setattr__,
It is not equivalent. Instances of Foo() would behave equivalently but it might do something different for subclasses of Foo. If you're interested in learning more about super(), have a look at: http://rhettinger.wordpress.com/2011/05/26/super-considered-super/
In the meantime, I'm closing this because we do not make that blanket advice to always use super() instead of a direct call to a parent. Sometimes you want one and sometimes you want the other depending on what you're trying to do.
----------
resolution: -> not a bug
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21814>
_______________________________________
More information about the docs
mailing list