kopia lustrzana https://github.com/micropython/micropython-lib
fnmatch: Get rid of functools.lru_cache.
uPy is not interested in memory/performance trade-offs.pull/118/head
rodzic
fa9f1ac855
commit
69f67c407a
|
@ -13,7 +13,7 @@ import os
|
|||
import os.path
|
||||
import posixpath
|
||||
import re
|
||||
import functools
|
||||
#import functools
|
||||
|
||||
__all__ = ["filter", "fnmatch", "fnmatchcase", "translate"]
|
||||
|
||||
|
@ -36,7 +36,7 @@ def fnmatch(name, pat):
|
|||
pat = os.path.normcase(pat)
|
||||
return fnmatchcase(name, pat)
|
||||
|
||||
@functools.lru_cache(maxsize=256, typed=True)
|
||||
#@functools.lru_cache(maxsize=256, typed=True)
|
||||
def _compile_pattern(pat):
|
||||
if isinstance(pat, bytes):
|
||||
pat_str = str(pat, 'ISO-8859-1')
|
||||
|
|
Ładowanie…
Reference in New Issue