File: pep695.py

package info (click to toggle)
python-typeguard 4.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 544 kB
  • sloc: python: 6,271; makefile: 5
file content (12 lines) | stat: -rw-r--r-- 208 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from typeguard import typechecked


@typechecked
class ParametrizedClass[T]:
    def method(self, x: T, y: str) -> T:
        return x


@typechecked
def parametrized_func[T](x: T, y: str) -> T:
    return x