New submission from Armin Rigo <[EMAIL PROTECTED]>:

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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4230>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to