Commit 7539d51e authored by Guido van Rossum's avatar Guido van Rossum

Fix the Python property class in a comment right.

parent 368a587c
......@@ -911,21 +911,22 @@ PyWrapper_New(PyObject *d, PyObject *self)
self.__doc__ = doc
def __get__(self, inst, type=None):
if self.__get is NULL:
if self.__get is None:
raise AttributeError, "unreadable attribute"
if inst is None:
return self
return self.__get(inst)
def __set__(self, inst, value):
if value is None:
if self.__del is None:
raise AttributeError, "can't delete attribute"
return self.__del(inst)
else:
if self.__set is None:
raise AttributeError, "can't set attribute"
return self.__set(inst, value)
def __delete__(self, inst):
if self.__del is None:
raise AttributeError, "can't delete attribute"
return self.__del(inst)
*/
typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment