summaryrefslogtreecommitdiffstats
path: root/Lib/re/_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/re/_parser.py')
-rw-r--r--Lib/re/_parser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/re/_parser.py b/Lib/re/_parser.py
index 6c8a4ec..22d10ab 100644
--- a/Lib/re/_parser.py
+++ b/Lib/re/_parser.py
@@ -113,7 +113,6 @@ class SubPattern:
self.width = None
def dump(self, level=0):
- nl = True
seqtypes = (tuple, list)
for op, av in self.data:
print(level*" " + str(op), end='')
@@ -135,6 +134,9 @@ class SubPattern:
if item_no:
print(level*" " + "ELSE")
item_no.dump(level+1)
+ elif isinstance(av, SubPattern):
+ print()
+ av.dump(level+1)
elif isinstance(av, seqtypes):
nl = False
for a in av: