Skip to content

Commit

Permalink
Don't make redundant copies of the DFA (#2763)
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical authored Jan 14, 2022
1 parent 799f76f commit 7a29568
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blib2to3/pgen2/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def stack_copy(
stack: List[Tuple[DFAS, int, RawNode]]
) -> List[Tuple[DFAS, int, RawNode]]:
"""Nodeless stack copy."""
return [(copy.deepcopy(dfa), label, DUMMY_NODE) for dfa, label, _ in stack]
return [(dfa, label, DUMMY_NODE) for dfa, label, _ in stack]


class Recorder:
Expand Down

0 comments on commit 7a29568

Please sign in to comment.