Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 655 Bytes
#ifndef CUSTOM_H
#define CUSTOM_H
PyObject* builtin_prod_impl(PyModuleDef *module, PyObject *iterable, PyObject *start);
PyObject* builtin_prod(PyModuleDef *module, PyObject *args);
static const char builtin_prod_doc[] =
"prod($module, iterable, start=1, /)\n"
"Return the product of a \'start\' value (default: 1) plus an iterable of numbers\n"
"When the iterable is empty, return the start value.\n"
"This function is intended specifically for use with numeric values and may\n"
"reject non-numeric types.";
{"prod", (PyCFunction)builtin_prod, METH_VARARGS, builtin_prod_doc},