diff options
Diffstat (limited to 'Lib/optparse.py')
-rw-r--r-- | Lib/optparse.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/optparse.py b/Lib/optparse.py index 62d2f7e..4fbe094 100644 --- a/Lib/optparse.py +++ b/Lib/optparse.py @@ -824,7 +824,11 @@ except NameError: (True, False) = (1, 0) def isbasestring(x): - return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType) + try: + return isinstance(x, basestring) + except: + return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType) + class Values: |