File: cached_property.py

package info (click to toggle)
python-podman 5.4.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,140 kB
  • sloc: python: 7,532; makefile: 82; sh: 75
file content (10 lines) | stat: -rw-r--r-- 257 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
"""Provide cached_property for Python <=3.8 programs."""

import functools

try:
    from functools import cached_property  # pylint: disable=unused-import
except ImportError:

    def cached_property(fn):
        return property(functools.lru_cache()(fn))