summaryrefslogtreecommitdiff
path: root/argparse.py
diff options
context:
space:
mode:
authorThomas Waldmann <tw AT waldmann-edv DOT de>2011-03-30 16:19:52 +0200
committerThomas Waldmann <tw AT waldmann-edv DOT de>2011-03-30 16:19:52 +0200
commit9fe4aaee1e373293418ce1123be3d64b18d6fb29 (patch)
tree83604f799d6f5546f8ab92be49a32b927df15be5 /argparse.py
parente233111b1515fd7e9005c30a4053f2a7bb876ee3 (diff)
downloadargparse-9fe4aaee1e373293418ce1123be3d64b18d6fb29.tar.gz
fix Python 3.1 compatibility, 1 test failure see note below
Note: There is one harmless test failure due to "basestring" global name, I added a comment to the src about it. It is basically same issue as on python 2.3 with "set" and "sorted".
Diffstat (limited to 'argparse.py')
-rw-r--r--argparse.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/argparse.py b/argparse.py
index bfd6127..3bdcd33 100644
--- a/argparse.py
+++ b/argparse.py
@@ -96,6 +96,10 @@ except NameError:
# for python < 2.4 compatibility (sets module is there since 2.3):
from sets import Set as set
+try:
+ basestring
+except NameError:
+ basestring = str
try:
sorted