[Python-checkins] CVS: python/dist/src/Objects descrobject.c,2.20,2.21

Guido van Rossum gvanrossum@users.sourceforge.net
2001年12月10日 10:06:23 -0800


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv16551
Modified Files:
	descrobject.c 
Log Message:
Well what do you know. The Python implementation contained the same
bug as the C code. :-(
Index: descrobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/descrobject.c,v
retrieving revision 2.20
retrieving revision 2.21
diff -C2 -d -r2.20 -r2.21
*** descrobject.c	2001年12月10日 18:03:34	2.20
--- descrobject.c	2001年12月10日 18:06:21	2.21
***************
*** 912,919 ****
 
 def __get__(self, inst, type=None):
- if self.__get is None:
- raise AttributeError, "unreadable attribute"
 if inst is None:
 return self
 return self.__get(inst)
 
--- 912,919 ----
 
 def __get__(self, inst, type=None):
 if inst is None:
 return self
+ if self.__get is None:
+ raise AttributeError, "unreadable attribute"
 return self.__get(inst)
 

AltStyle によって変換されたページ (->オリジナル) /