[Python-checkins] CVS: python/dist/src/Demo/metaclasses Meta.py,1.3,1.4
Guido van Rossum
python-dev@python.org
Mon, 15 Jan 2001 08:54:00 -0800
Update of /cvsroot/python/python/dist/src/Demo/metaclasses
In directory usw-pr-cvs1:/tmp/cvs-serv30959
Modified Files:
Meta.py
Log Message:
Geoffrey Gerrietts discovered that a KeyError was caught that probably
should have been a NameError. I'm checking in a change that catches
both, just to be sure -- I can't be bothered trying to understand this
code any more. :-)
Index: Meta.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/metaclasses/Meta.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Meta.py 1998/09/14 16:44:12 1.3
--- Meta.py 2001/01/15 16:53:58 1.4
***************
*** 31,35 ****
try:
ga = self.__formalclass__.__getattr__('__usergetattr__')
! except KeyError:
raise AttributeError, name
return ga(self, name)
--- 31,35 ----
try:
ga = self.__formalclass__.__getattr__('__usergetattr__')
! except (KeyError, AttributeError):
raise AttributeError, name
return ga(self, name)