diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-07-08 11:31:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-08 11:31:25 (GMT) |
commit | 74ec02e9490d8aa086aa9ad9d1d34d2ad999b5af (patch) | |
tree | d15009477ea3684249a6f4b3b38827c2c60760ba /Lib/re/_parser.py | |
parent | ec7180bd1b3c156d4484e8e6babc5ecb707420e3 (diff) | |
download | cpython-74ec02e9490d8aa086aa9ad9d1d34d2ad999b5af.zip cpython-74ec02e9490d8aa086aa9ad9d1d34d2ad999b5af.tar.gz cpython-74ec02e9490d8aa086aa9ad9d1d34d2ad999b5af.tar.bz2 |
gh-106510: Fix DEBUG output for atomic group (GH-106511)
Diffstat (limited to 'Lib/re/_parser.py')
-rw-r--r-- | Lib/re/_parser.py | 4 |
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: |