Skip to content

Get rid of getPhases #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Get rid of getPhases
This added a fair bit of complexity, and notable made the Phase classes
dynamically generated.

However, by doing this, we no longer include "process the
token using the rules for" phases in the debug log.
  • Loading branch information
gsnedders committed Sep 27, 2020
commit c52e731c5f1de115ff0d9fcb9ecef15c32463b81
12 changes: 0 additions & 12 deletions html5lib/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,3 @@ def moduleFactory(baseModule, *args, **kwargs):
return mod

return moduleFactory


def memoize(func):
cache = {}

def wrapped(*args, **kwargs):
key = (tuple(args), tuple(kwargs.items()))
if key not in cache:
cache[key] = func(*args, **kwargs)
return cache[key]

return wrapped
Loading