]> granicus.if.org Git - python/commitdiff
Well what do you know. The Python implementation contained the same
authorGuido van Rossum <guido@python.org>
Mon, 10 Dec 2001 18:06:21 +0000 (18:06 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Dec 2001 18:06:21 +0000 (18:06 +0000)
bug as the C code. :-(

Objects/descrobject.c

index 4022e89acd53db523c18af83b78ed3f1f18088eb..54c034718457fcf0842d3f273e72d9bd10327d77 100644 (file)
@@ -911,10 +911,10 @@ PyWrapper_New(PyObject *d, PyObject *self)
             self.__doc__ = doc
 
         def __get__(self, inst, type=None):
-            if self.__get is None:
-                raise AttributeError, "unreadable attribute"
             if inst is None:
                 return self
+            if self.__get is None:
+                raise AttributeError, "unreadable attribute"
             return self.__get(inst)
 
         def __set__(self, inst, value):