-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Milestone
Description
Mac OS version 10.14
Python 3.7.3
using cython V0.29.1
The following code compile correctly. but crush in run time:
cython code:
class GlobalFunctions:
ITER_FUNC = None
cdef class INSTANCE:
def do_iter(self, *args, **kwargs):
yield from GlobalFunctions.ITER_FUNC(*args, **kwargs)
python code:
def user_iter(x=1,b=None):
for i in range(10):
yield i
GlobalFunctions.ITER_FUNC = user_iter
t = INSTANCE()
for x in t.do_iter():
print(x)