[pypy-issue] Issue #2199: Data Descriptors incorrectly implemented (pypy/pypy)

jacobz_20 issues-reply at bitbucket.org
Tue Dec 1 09:27:19 EST 2015


New issue 2199: Data Descriptors incorrectly implemented
https://bitbucket.org/pypy/pypy/issues/2199/data-descriptors-incorrectly-implemented

jacobz_20:

Consider the following descriptor:

```
#!python

class desc:
    def __get__(self, instance, owner):
        return "get"
    def __delete__(self, instance):
        print("delete")
```
Pypy seems to not consider this to be a data descriptor. Assigning a value to an attribute of this descriptor type should raise an "AttributeError: __set__", but it instead saves the value on the instance dictionary. Then, when the attribute is looked up, it pulls it from the instance rather than calling __get__().




More information about the pypy-issue mailing list