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@python
components: Documentation
messages: 221082
nosy: docs@python, vincentbesanceney
priority: normal
severity: normal
status: open
title: object.__setattr__ or super(...).__setattr__?
type: enhancement
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21814>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to