mirror of
https://github.com/python/cpython.git
synced 2024-11-28 12:31:14 +08:00
Use types.StringTypes instead of explicit (str, unicode) list
This commit is contained in:
parent
7b7ba54033
commit
755f75eef8
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user