From 9fe4aaee1e373293418ce1123be3d64b18d6fb29 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 30 Mar 2011 16:19:52 +0200 Subject: 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". --- argparse.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'argparse.py') 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 -- cgit v1.2.1