Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Cython c+中的初始化列表+;班级 在“实验AlpEppcPopCyraseDeF”功能中,您可以在Cython()中编写C++类,初始化列表有语法吗?这似乎是控制在继承类中调用哪些构造函数所必需的 例子_Python_C++_Inheritance_Cython - Fatal编程技术网

Python Cython c+中的初始化列表+;班级 在“实验AlpEppcPopCyraseDeF”功能中,您可以在Cython()中编写C++类,初始化列表有语法吗?这似乎是控制在继承类中调用哪些构造函数所必需的 例子

Python Cython c+中的初始化列表+;班级 在“实验AlpEppcPopCyraseDeF”功能中,您可以在Cython()中编写C++类,初始化列表有语法吗?这似乎是控制在继承类中调用哪些构造函数所必需的 例子,python,c++,inheritance,cython,Python,C++,Inheritance,Cython,C++“myclass.h”: 赛顿: cdef extern from "myclass.h" namespace "myclass": cdef cppclass MyClass: MyClass() MyClass(int x) cdef cppclass SubClass(MyClass): def __init__(int x): # Implicitly calls MyClass::MyCla

C++“myclass.h”:

赛顿:

cdef extern from "myclass.h" namespace "myclass":
    cdef cppclass MyClass:
         MyClass()
         MyClass(int x)

cdef cppclass SubClass(MyClass):
         def __init__(int x):
             # Implicitly calls MyClass::MyClass(), but would like to
             # call MyClass::MyClass(x)            
             pass
cdef extern from "myclass.h" namespace "myclass":
    cdef cppclass MyClass:
         MyClass()
         MyClass(int x)

cdef cppclass SubClass(MyClass):
         def __init__(int x):
             # Implicitly calls MyClass::MyClass(), but would like to
             # call MyClass::MyClass(x)            
             pass