File: wrapped_objects.py

package info (click to toggle)
pytkdocs 0.16.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 784 kB
  • sloc: python: 4,621; makefile: 28; javascript: 13
file content (14 lines) | stat: -rw-r--r-- 255 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import functools


@functools.lru_cache(maxsize=1024)
def my_function(some_arg):
    """My docstring."""
    return some_arg


class A:
    @functools.lru_cache(maxsize=1024)
    def hello(self, name):
        """Hello!"""
        return f"Hello {name}!"