You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A step by step explanation - \* The ``<Python.h>`` file consists of all
292
-
the required types (to represent Python object types) and function
293
-
definitions (to operate on the python objects). \* Next we write the
294
-
function which we plan to call from python. Conventionally the function
295
-
names are {module-name}\_{function-name}, which in this case is
296
-
``addList_add``. More about the function later. \* Then fill in the info
297
-
table - which contains all the relevant info of the functions we desire
298
-
to have in the module. Every row corresponds to a function, with the
299
-
last one being a sentinel value (row of null elements). \* Finally the
300
-
module initialization block which is of the signature
301
-
``PyMODINIT_FUNC init{module-name}``.
291
+
A step by step explanation :
292
+
293
+
- The ``<Python.h>`` file consists of all the required types (to represent Python object types) and function definitions (to operate on the python objects).
294
+
- Next we write the function which we plan to call from python. Conventionally the function names are {module-name}\_{function-name}, which in this case is ``addList_add``. More about the function later.
295
+
- Then fill in the info table - which contains all the relevant info of the functions we desire to have in the module. Every row corresponds to a function, with the last one being a sentinel value (row of null elements).
296
+
- Finally the module initialization block which is of the signature ``PyMODINIT_FUNC init{module-name}``.
302
297
303
298
The function ``addList_add`` accepts arguments as a PyObject type struct
304
299
(args is also a tuple type - but since everything in python is an
0 commit comments