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

Vincent Besanceney report at bugs.python.org
Fri Jun 20 12:02:12 CEST 2014


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 with the same name, for example, object.__setattr__(self, name, value)."

Wouldn't it be more consistent for new-style classes, instead of calling "object.__setattr__(self, name, value)", to call "super(<ClassName>, self).__setattr__(name, value)"?

----------
assignee: docs at python
components: Documentation
messages: 221082
nosy: docs at python, vincentbesanceney
priority: normal
severity: normal
status: open
title: object.__setattr__ or super(...).__setattr__?
type: enhancement
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21814>
_______________________________________


More information about the docs mailing list