Skip to content

Commit

Permalink
Merge pull request #499
Browse files Browse the repository at this point in the history
Allow `int` or `None` for `cache_size_limit` to `enable_packrat`.
  • Loading branch information
ptmcg committed Jul 28, 2023
2 parents bc4f614 + 71116e0 commit a60ec32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyparsing/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ def enable_left_recursion(
ParserElement._left_recursion_enabled = True

@staticmethod
def enable_packrat(cache_size_limit: int = 128, *, force: bool = False) -> None:
def enable_packrat(cache_size_limit: Union[int, None] = 128, *, force: bool = False) -> None:
"""
Enables "packrat" parsing, which adds memoizing to the parsing logic.
Repeated parse attempts at the same string location (which happens
Expand Down

0 comments on commit a60ec32

Please sign in to comment.