整数型クラス変数の読み取り

2018/04/17

Cython [test.pyd]

cdef class Test:
    cdef int no
    cdef object pyobj

    def __cinit__(self):
        self.no = 5

    def get(self):
        return self.no

Python

# -*- coding: utf-8 -*-

import test

t = test.Test()
print(t.get())


test.noは読み込めないけど、関数から読める