scott-griffiths / bitstring

A Python module to help you manage your bits
https://bitstring.readthedocs.io/en/stable/index.html
MIT License
412 stars 68 forks source link

Use standard lru_cache #221

Closed scott-griffiths closed 2 years ago

scott-griffiths commented 3 years ago

There's a decorator to manage caching in Python 3.2+ https://docs.python.org/3/library/functools.html#functools.lru_cache

Might be more efficient than our hand-rolled version so we should try it when we stop 2.7 support.

scott-griffiths commented 2 years ago

It appears more general than our version but not as useful without some refactoring.