diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-03-19 05:33:36 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-03-19 05:33:36 (GMT) |
commit | 8a5f8ca33b56db9af973d1f34a9b3df5271b56c0 (patch) | |
tree | 55b17647085ff8b679f2bea803545884148c66e4 /Lib/lib2to3/pytree.py | |
parent | f733c60d9aea123a46cd41dbe4dedee7aa2f20f3 (diff) | |
download | cpython-8a5f8ca33b56db9af973d1f34a9b3df5271b56c0.zip cpython-8a5f8ca33b56db9af973d1f34a9b3df5271b56c0.tar.gz cpython-8a5f8ca33b56db9af973d1f34a9b3df5271b56c0.tar.bz2 |
Run 2to3 on this library.
Diffstat (limited to 'Lib/lib2to3/pytree.py')
-rw-r--r-- | Lib/lib2to3/pytree.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lib2to3/pytree.py b/Lib/lib2to3/pytree.py index 7584f71..6657144 100644 --- a/Lib/lib2to3/pytree.py +++ b/Lib/lib2to3/pytree.py @@ -443,7 +443,7 @@ class LeafPattern(BasePattern): if type is not None: assert 0 <= type < 256, type if content is not None: - assert isinstance(content, basestring), repr(content) + assert isinstance(content, str), repr(content) self.type = type self.content = content self.name = name @@ -491,7 +491,7 @@ class NodePattern(BasePattern): if type is not None: assert type >= 256, type if content is not None: - assert not isinstance(content, basestring), repr(content) + assert not isinstance(content, str), repr(content) content = list(content) for i, item in enumerate(content): assert isinstance(item, BasePattern), (i, item) @@ -622,7 +622,7 @@ class WildcardPattern(BasePattern): """ if self.content is None: # Shortcut for special case (see __init__.__doc__) - for count in xrange(self.min, 1 + min(len(nodes), self.max)): + for count in range(self.min, 1 + min(len(nodes), self.max)): r = {} if self.name: r[self.name] = nodes[:count] |