mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
16 lines
336 B
Python
16 lines
336 B
Python
from contextlib import contextmanager
|
|
from functools import lru_cache
|
|
from typing import Generator
|
|
|
|
|
|
@lru_cache(maxsize=None)
|
|
def slow_function(message, timeout):
|
|
"""This function is slow."""
|
|
print(message)
|
|
|
|
|
|
@contextmanager
|
|
def feeling_good(x: int, y: int) -> Generator:
|
|
"""You'll feel better in this context!"""
|
|
yield
|