DEBSOURCES
Skip Quicknav
sources / cython / 3.0.11%2Bdfsg-2 / docs / examples / tutorial / pure / exceptval.py
1234567
import cython @cython.exceptval(-1) def func(x: cython.int) -> cython.int: if x < 0: raise ValueError("need integer >= 0") return x + 1