[issue1615] descriptor protocol bug
Antoine Pitrou
report at bugs.python.org
Sun Jan 20 18:29:08 CET 2008
Antoine Pitrou added the comment:
I can confirm that with SVN trunk, and it's actually even worse because
it can return unexpected results without raising an exception at all:
>>> class Foo(object):
... def __getattr__(self, name): return 42
... @property
... def bacon(self): return int.lalala
...
>>> f = Foo()
>>> f.bacon
42
>>> Foo.bacon.__get__(f)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in bacon
AttributeError: type object 'int' has no attribute 'lalala'
----------
nosy: +pitrou
severity: normal -> major
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1615>
__________________________________
More information about the Python-bugs-list
mailing list