#include "pycore_modsupport.h"
PyDoc_STRVAR(tuple_index__doc__,
"index($self, value, start=0, stop=sys.maxsize, /)\n"
"--\n"
"\n"
"Return first index of value.\n"
"\n"
"Raises ValueError if the value is not present.");
#define TUPLE_INDEX_METHODDEF …
static PyObject *
tuple_index_impl(PyTupleObject *self, PyObject *value, Py_ssize_t start,
Py_ssize_t stop);
static PyObject *
tuple_index(PyTupleObject *self, PyObject *const *args, Py_ssize_t nargs)
{ … }
PyDoc_STRVAR(tuple_count__doc__,
"count($self, value, /)\n"
"--\n"
"\n"
"Return number of occurrences of value.");
#define TUPLE_COUNT_METHODDEF …
PyDoc_STRVAR(tuple_new__doc__,
"tuple(iterable=(), /)\n"
"--\n"
"\n"
"Built-in immutable sequence.\n"
"\n"
"If no argument is given, the constructor returns an empty tuple.\n"
"If iterable is specified the tuple is initialized from iterable\'s items.\n"
"\n"
"If the argument is a tuple, the return value is the same object.");
static PyObject *
tuple_new_impl(PyTypeObject *type, PyObject *iterable);
static PyObject *
tuple_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{ … }
PyDoc_STRVAR(tuple___getnewargs____doc__,
"__getnewargs__($self, /)\n"
"--\n"
"\n");
#define TUPLE___GETNEWARGS___METHODDEF …
static PyObject *
tuple___getnewargs___impl(PyTupleObject *self);
static PyObject *
tuple___getnewargs__(PyTupleObject *self, PyObject *Py_UNUSED(ignored))
{ … }