]> granicus.if.org Git - python/commitdiff
Use types.StringTypes instead of explicit (str, unicode) list
authorMichael W. Hudson <mwh@python.net>
Mon, 20 May 2002 17:29:46 +0000 (17:29 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 20 May 2002 17:29:46 +0000 (17:29 +0000)
Lib/inspect.py

index 38b93bf80ca8b37a2037eab17cf876b3b7542c21..2f9511a0eef1714b8522228c66b1d4a450513268 100644 (file)
@@ -267,7 +267,7 @@ def getdoc(object):
         doc = object.__doc__
     except AttributeError:
         return None
-    if not isinstance(doc, (str, unicode)):
+    if not isinstance(doc, types.StringTypes):
         return None
     try:
         lines = string.split(string.expandtabs(doc), '\n')