]>
jfr.im git - yt-dlp.git/blob - yt_dlp/compat/functools.py
2 from functools
import * # noqa: F403
4 from .compat_utils
import passthrough_module
6 passthrough_module(__name__
, 'functools')
12 cache
= lru_cache(maxsize
=None)
15 cached_property
# >= 3.8
17 class cached_property
:
18 def __init__(self
, func
):
19 update_wrapper(self
, func
)
22 def __get__(self
, instance
, _
):
25 setattr(instance
, self
.func
.__name
__, self
.func(instance
))
26 return getattr(instance
, self
.func
.__name
__)