summaryrefslogtreecommitdiff
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r--Lib/sre_parse.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index 2b3064b0ef..49dc080ed4 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -103,30 +103,30 @@ class SubPattern:
nl = 1
seqtypes = type(()), type([])
for op, av in self.data:
- print level*" " + op,; nl = 0
+ print(level*" " + op, end=' '); nl = 0
if op == "in":
# member sublanguage
- print; nl = 1
+ print(); nl = 1
for op, a in av:
- print (level+1)*" " + op, a
+ print((level+1)*" " + op, a)
elif op == "branch":
- print; nl = 1
+ print(); nl = 1
i = 0
for a in av[1]:
if i > 0:
- print level*" " + "or"
+ print(level*" " + "or")
a.dump(level+1); nl = 1
i = i + 1
elif type(av) in seqtypes:
for a in av:
if isinstance(a, SubPattern):
- if not nl: print
+ if not nl: print()
a.dump(level+1); nl = 1
else:
- print a, ; nl = 0
+ print(a, end=' ') ; nl = 0
else:
- print av, ; nl = 0
- if not nl: print
+ print(av, end=' ') ; nl = 0
+ if not nl: print()
def __repr__(self):
return repr(self.data)
def __len__(self):