mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
[3.11] gh-106510: Fix DEBUG output for atomic group (GH-106511) (GH-106549)
(cherry picked from commit 74ec02e949
)
This commit is contained in:
parent
44c335e47d
commit
2d037fb406
3 changed files with 8 additions and 2 deletions
|
@ -114,7 +114,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='')
|
||||
|
@ -136,6 +135,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue