summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/pytree.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/pytree.py')
-rw-r--r--Lib/lib2to3/pytree.py6
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]