[Python-checkins] CVS: python/dist/src/Lib inspect.py,1.10,1.11

Ka-Ping Yee ping@users.sourceforge.net
2001年3月23日 07:30:01 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv13652
Modified Files:
	inspect.py 
Log Message:
Extend isclass() to work for extension classes (by looking for __bases__).
Index: inspect.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/inspect.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** inspect.py	2001年03月23日 05:14:09	1.10
--- inspect.py	2001年03月23日 15:29:59	1.11
***************
*** 45,49 ****
 __doc__ documentation string
 __module__ name of module in which this class was defined"""
! return type(object) is types.ClassType
 
 def ismethod(object):
--- 45,49 ----
 __doc__ documentation string
 __module__ name of module in which this class was defined"""
! return type(object) is types.ClassType or hasattr(object, '__bases__')
 
 def ismethod(object):

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