diff options
Diffstat (limited to 'PyEmb.py')
| -rw-r--r-- | PyEmb.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -5,6 +5,14 @@ import math import sys from copy import deepcopy +try: + from functools import lru_cache +except ImportError: + from backports.functools_lru_cache import lru_cache + +# simplify use of lru_cache decorator +def cache(*args, **kwargs): + return lru_cache(maxsize=None)(*args, **kwargs) class Point: |
