Cythonの型付け 普通のPythonとしても動く形での型付け(Pre Python Mode) デコレータ import cython # デコレータを使った型付け @cython.locals(a=cython.int, sum=cython.int, i=cython.int) @cython.returns(cython.int) @cython.cfunc def f(a): sum = 0 for i in range(a): sum += i return sum 型アノテーション(PEP484) import cython # Cの中でしか使わないぞという宣言 @cython…