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

Ka-Ping Yee ping@users.sourceforge.net
Fri, 13 Apr 2001 07:04:04 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv1448

Modified Files:
	inspect.py 
Log Message:
Clean up isroutine().


Index: inspect.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/inspect.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** inspect.py	2001/04/13 12:10:40	1.15
--- inspect.py	2001/04/13 14:04:02	1.16
***************
*** 128,133 ****
  def isroutine(object):
      """Return true if the object is any kind of function or method."""
!     return type(object) in [types.FunctionType, types.LambdaType,
!                             types.MethodType, types.BuiltinFunctionType]
  
  def getmembers(object, predicate=None):
--- 128,132 ----
  def isroutine(object):
      """Return true if the object is any kind of function or method."""
!     return isbuiltin(object) or isfunction(object) or ismethod(object)
  
  def getmembers(object, predicate=None):