• Home
  • Raw
  • Download

Lines Matching +full:is +full:- +full:arguments

12 ----------------------
15 The signature of the slot is::
19 A call is made using a tuple for the positional arguments
20 and a dict for the keyword arguments, similarly to
22 *args* must be non-NULL (use an empty tuple if there are no arguments)
23 but *kwargs* may be *NULL* if there are no keyword arguments.
25 This convention is not only used by *tp_call*:
27 also pass arguments this way.
30 :ref:`call API <capi-call>`.
36 -----------------------
44 if the callable supports it. However, this is not a hard rule.
45 Additionally, some third-party extensions use *tp_call* directly
50 regardless of which protocol is used.
51 The recommended way to achieve this is by setting
62 the arguments to an args tuple and kwargs dict anyway, then there is no point
69 This is a pointer to a function with the following signature:
73 - *callable* is the object being called.
74 - *args* is a C array consisting of the positional arguments followed by the
75 values of the keyword arguments.
76 This can be *NULL* if there are no arguments.
77 - *nargsf* is the number of positional arguments plus possibly the
79 To get the actual number of positional arguments from *nargsf*,
81 - *kwnames* is a tuple containing the names of the keyword arguments;
85 If there are no keyword arguments, then *kwnames* can instead be *NULL*.
89 If this flag is set in a vectorcall *nargsf* argument, the callee is allowed
90 to temporarily change ``args[-1]``. In other words, *args* points to
92 The callee must restore the value of ``args[-1]`` before returning.
102 To call an object that implements vectorcall, use a :ref:`call API <capi-call>`
117 The old names are still defined as aliases of the new, non-underscored names.
128 For efficiency, this is not the case for calls done using vectorcall:
139 arguments.
156 This is mostly useful to check whether or not *op* supports vectorcall,
164 arguments given in a tuple and dict, respectively.
166 This is a specialized function, intended to be put in the
174 .. _capi-call:
177 ------------------
180 Each converts its arguments to a convention supported by the called object –
188 +------------------------------------------+------------------+--------------------+---------------+
192 +------------------------------------------+------------------+--------------------+---------------+
193 | :c:func:`PyObject_CallNoArgs` | ``PyObject *`` | --- | --- |
194 +------------------------------------------+------------------+--------------------+---------------+
195 | :c:func:`PyObject_CallOneArg` | ``PyObject *`` | 1 object | --- |
196 +------------------------------------------+------------------+--------------------+---------------+
197 | :c:func:`PyObject_CallObject` | ``PyObject *`` | tuple/``NULL`` | --- |
198 +------------------------------------------+------------------+--------------------+---------------+
199 | :c:func:`PyObject_CallFunction` | ``PyObject *`` | format | --- |
200 +------------------------------------------+------------------+--------------------+---------------+
201 | :c:func:`PyObject_CallMethod` | obj + ``char*`` | format | --- |
202 +------------------------------------------+------------------+--------------------+---------------+
203 | :c:func:`PyObject_CallFunctionObjArgs` | ``PyObject *`` | variadic | --- |
204 +------------------------------------------+------------------+--------------------+---------------+
205 | :c:func:`PyObject_CallMethodObjArgs` | obj + name | variadic | --- |
206 +------------------------------------------+------------------+--------------------+---------------+
207 | :c:func:`PyObject_CallMethodNoArgs` | obj + name | --- | --- |
208 +------------------------------------------+------------------+--------------------+---------------+
209 | :c:func:`PyObject_CallMethodOneArg` | obj + name | 1 object | --- |
210 +------------------------------------------+------------------+--------------------+---------------+
212 +------------------------------------------+------------------+--------------------+---------------+
214 +------------------------------------------+------------------+--------------------+---------------+
216 +------------------------------------------+------------------+--------------------+---------------+
221 Call a callable Python object *callable*, with arguments given by the
222 tuple *args*, and named arguments given by the dictionary *kwargs*.
224 *args* must not be *NULL*; use an empty tuple if no arguments are needed.
225 If no named arguments are needed, *kwargs* can be *NULL*.
230 This is the equivalent of the Python expression:
236 Call a callable Python object *callable* without any arguments. It is the
248 *arg* and no keyword arguments.
258 Call a callable Python object *callable*, with arguments given by the
259 tuple *args*. If no arguments are needed, then *args* can be *NULL*.
264 This is the equivalent of the Python expression: ``callable(*args)``.
269 Call a callable Python object *callable*, with a variable number of C arguments.
270 The C arguments are described using a :c:func:`Py_BuildValue` style format
271 string. The format can be *NULL*, indicating that no arguments are provided.
276 This is the equivalent of the Python expression: ``callable(*args)``.
279 :c:func:`PyObject_CallFunctionObjArgs` is a faster alternative.
288 arguments. The C arguments are described by a :c:func:`Py_BuildValue` format
291 The format can be *NULL*, indicating that no arguments are provided.
296 This is the equivalent of the Python expression:
300 :c:func:`PyObject_CallMethodObjArgs` is a faster alternative.
309 :c:expr:`PyObject *` arguments. The arguments are provided as a variable number
315 This is the equivalent of the Python expression:
321 Call a method of the Python object *obj*, where the name of the method is given as a
322 Python string object in *name*. It is called with a variable number of
323 :c:expr:`PyObject *` arguments. The arguments are provided as a variable number
332 Call a method of the Python object *obj* without arguments,
333 where the name of the method is given as a Python string object in *name*.
344 *arg*, where the name of the method is given as a Python string object in
356 The arguments are the same as for :c:type:`vectorcallfunc`.
367 Call *callable* with positional arguments passed exactly as in the vectorcall_ protocol,
368 but with keyword arguments passed as a dictionary *kwdict*.
369 The *args* array contains only the positional arguments.
371 Regardless of which protocol is used internally,
372 a conversion of arguments needs to be done.
374 already has a dictionary ready to use for the keyword arguments,
375 but not a tuple for the positional arguments.
382 is given as a Python string *name*. The object whose method is called is
383 *args[0]*, and the *args* array starting at *args[1]* represents the arguments
385 *nargsf* is the number of positional arguments including *args[0]*,
387 temporarily be changed. Keyword arguments can be passed just like in
392 *args* vector as arguments.
401 ----------------
405 Determine if the object *o* is callable. Return ``1`` if the object is callable