[New-bugs-announce] [issue4230] "__getattr__" can't be a descriptor

Armin Rigo report at bugs.python.org
Wed Oct 29 18:46:02 CET 2008


New submission from Armin Rigo <arigo at users.sourceforge.net>:

The attached example works in the __add__ and __getattribute__ cases on
CPython, but fails in the __getattr__ case.  All three cases work as the
semantics say they should on Jython, IronPython and PyPy.  It's
admittedly an obscure use case. 

There is no reason that __getattr__ should behave differently.  The
behavior of __add__ and __getattribute__ is the "correct" one, according
to the rule that special methods are bound (with __get__) before they
are called.

----------
components: Interpreter Core
files: x.py
messages: 75322
nosy: arigo, cfbolz
priority: low
severity: normal
status: open
title: "__getattr__" can't be a descriptor
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file11905/x.py

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


More information about the New-bugs-announce mailing list