Skip to content

Commit d764def

Browse files
committed
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.
1 parent f4646e6 commit d764def

File tree

3 files changed

+2171
-2189
lines changed

3 files changed

+2171
-2189
lines changed

html5lib/_utils.py

-12
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,3 @@ def moduleFactory(baseModule, *args, **kwargs):
145145
return mod
146146

147147
return moduleFactory
148-
149-
150-
def memoize(func):
151-
cache = {}
152-
153-
def wrapped(*args, **kwargs):
154-
key = (tuple(args), tuple(kwargs.items()))
155-
if key not in cache:
156-
cache[key] = func(*args, **kwargs)
157-
return cache[key]
158-
159-
return wrapped

0 commit comments

Comments
 (0)