• Home
  • Raw
  • Download

Lines Matching +full:- +full:o2

57   suggested by Guido in off-line discussions):
59 - "Very high level layer": two or three functions that let you exec or
68 - "Abstract objects layer": which is the subject of this proposal.
73 - "Concrete objects layer": This is the public type-dependent
74 interface provided by the standard built-in types, such as floats,
82 - "Python module interface": this interface consist of the basic
84 current extensions-writing guide deals with this interface.
86 - "Built-in object interface": this is the interface that a new
87 built-in type must provide and the mechanisms and rules that a
88 developer of a new built-in type must use and follow.
90 This proposal is a "first-cut" that is intended to spur
99 constructors for building objects of built-in types. This is needed
121 type-specific routines are called directly (e.g. setlistitem). The
124 built-in types.
136 Print an object, o, on file, fp. Returns -1 on
194 to the value v. Raise an exception and return -1 on failure; return 0 on
204 to the value v. Raise an exception and return -1 on failure; return 0 on
214 -1 on failure. This is the equivalent of the Python
224 Delete attribute named attr_name, for object o. Returns -1
231 PyAPI_FUNC(int) PyObject_Cmp(PyObject *o1, PyObject *o2, int *result);
234 Compare the values of o1 and o2 using a routine provided by
235 o1, if one exists, otherwise with a routine provided by o2.
237 -1 on failure. This is the equivalent of the Python
238 statement: result=cmp(o1,o2).
244 int PyObject_Compare(PyObject *o1, PyObject *o2);
246 Compare the values of o1 and o2 using a routine provided by
247 o1, if one exists, otherwise with a routine provided by o2.
250 Python expression: cmp(o1,o2).
262 Called by the repr() built-in function and by reverse quotes.
274 Called by the str() built-in function and by the print
287 Called by the unistr() built-in function.
332 using a mkvalue-style format string. The format may be NULL,
387 failure, return -1. This is the equivalent of the Python
398 considered to be false and -1 on failure. This is equivalent to the
408 considered to be false and -1 on failure. This is equivalent to the
426 returned. On error, -1 is returned. This is the equivalent
440 If neither of those return a non-negative value, then return the
441 default value. If one of the calls fails, this function returns -1.
456 Map the object key to the value v. Raise an exception and return -1
465 Returns -1 on failure. This is equivalent to
472 Delete the mapping for key from *o. Returns -1 on failure.
483 read-only memory location useable as character based input
487 set in case no error occurs. Otherwise, -1 is returned and
508 pointer to a read-only memory location which can contain
512 set in case no error occurs. Otherwise, -1 is returned and
527 set in case no error occurs. Otherwise, -1 is returned and
535 (((obj)->ob_type->tp_as_buffer != NULL) && \
536 (PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_NEWBUFFER)) && \
537 ((obj)->ob_type->tp_as_buffer->bf_getbuffer != NULL))
545 /* This is a C-API version of the getbuffer function call. It checks
547 call. Returns -1 and raises an error on failure and returns 0 on
555 Note that view->ndim is the assumed size of indices
560 /* Return the implied itemsize of the data-format area from a
561 struct-style description */
574 0 on success and return -1 and raise a PyBuffer_Error on
578 If fort is 'F' and the object is multi-dimensional,
580 Fortran-style (first dimension varies the fastest). If
582 in C-style (last dimension varies the fastest). If fort
602 /* Fill the strides array with byte-strides of a contiguous
603 (Fortran-style if fort is 'F' or C-style otherwise)
612 /* Fills in a buffer-info structure correctly for an exporter
615 and -1 (with raising an error) on error.
638 (PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_ITER) && \
639 (obj)->ob_type->tp_iternext != NULL && \
640 (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
660 PyAPI_FUNC(PyObject *) PyNumber_Add(PyObject *o1, PyObject *o2);
663 Returns the result of adding o1 and o2, or null on failure.
664 This is the equivalent of the Python expression: o1+o2.
669 PyAPI_FUNC(PyObject *) PyNumber_Subtract(PyObject *o1, PyObject *o2);
672 Returns the result of subtracting o2 from o1, or null on
674 o1-o2.
678 PyAPI_FUNC(PyObject *) PyNumber_Multiply(PyObject *o1, PyObject *o2);
681 Returns the result of multiplying o1 and o2, or null on
683 o1*o2.
688 PyAPI_FUNC(PyObject *) PyNumber_Divide(PyObject *o1, PyObject *o2);
691 Returns the result of dividing o1 by o2, or null on failure.
692 This is the equivalent of the Python expression: o1/o2.
697 PyAPI_FUNC(PyObject *) PyNumber_FloorDivide(PyObject *o1, PyObject *o2);
700 Returns the result of dividing o1 by o2 giving an integral result,
702 This is the equivalent of the Python expression: o1//o2.
707 PyAPI_FUNC(PyObject *) PyNumber_TrueDivide(PyObject *o1, PyObject *o2);
710 Returns the result of dividing o1 by o2 giving a float result,
712 This is the equivalent of the Python expression: o1/o2.
717 PyAPI_FUNC(PyObject *) PyNumber_Remainder(PyObject *o1, PyObject *o2);
720 Returns the remainder of dividing o1 by o2, or null on
722 o1%o2.
727 PyAPI_FUNC(PyObject *) PyNumber_Divmod(PyObject *o1, PyObject *o2);
730 See the built-in function divmod. Returns NULL on failure.
732 divmod(o1,o2).
737 PyAPI_FUNC(PyObject *) PyNumber_Power(PyObject *o1, PyObject *o2,
741 See the built-in function pow. Returns NULL on failure.
743 pow(o1,o2,o3), where o3 is optional.
751 This is the equivalent of the Python expression: -o.
781 PyAPI_FUNC(PyObject *) PyNumber_Lshift(PyObject *o1, PyObject *o2);
784 Returns the result of left shifting o1 by o2 on success, or
786 expression: o1 << o2.
791 PyAPI_FUNC(PyObject *) PyNumber_Rshift(PyObject *o1, PyObject *o2);
794 Returns the result of right shifting o1 by o2 on success, or
796 expression: o1 >> o2.
800 PyAPI_FUNC(PyObject *) PyNumber_And(PyObject *o1, PyObject *o2);
803 Returns the result of bitwise and of o1 and o2 on success, or
805 expression: o1&o2.
810 PyAPI_FUNC(PyObject *) PyNumber_Xor(PyObject *o1, PyObject *o2);
813 Returns the bitwise exclusive or of o1 by o2 on success, or
815 expression: o1^o2.
820 PyAPI_FUNC(PyObject *) PyNumber_Or(PyObject *o1, PyObject *o2);
823 Returns the result of bitwise or on o1 and o2 on success, or
825 expression: o1|o2.
842 return -1 (failure) and don't increment the reference counts.
843 The call PyNumber_Coerce(&o1, &o2) is equivalent to the Python
844 statement o1, o2 = coerce(o1, o2).
849 ((obj)->ob_type->tp_as_number != NULL && \
850 PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_INDEX) && \
851 (obj)->ob_type->tp_as_number->nb_index != NULL)
878 converting the int-or-long to Py_ssize_t, then the second argument
879 is the error-type to return. If it is NULL, then the overflow error
909 /* In-place variants of (some of) the above number protocol functions */
911 PyAPI_FUNC(PyObject *) PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2);
914 Returns the result of adding o2 to o1, possibly in-place, or null
916 o1 += o2.
920 PyAPI_FUNC(PyObject *) PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2);
923 Returns the result of subtracting o2 from o1, possibly in-place or
925 o1 -= o2.
929 PyAPI_FUNC(PyObject *) PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2);
932 Returns the result of multiplying o1 by o2, possibly in-place, or
934 o1 *= o2.
938 PyAPI_FUNC(PyObject *) PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2);
941 Returns the result of dividing o1 by o2, possibly in-place, or null
943 o1 /= o2.
948 PyObject *o2);
951 Returns the result of dividing o1 by o2 giving an integral result,
952 possibly in-place, or null on failure.
954 o1 /= o2.
959 PyObject *o2);
962 Returns the result of dividing o1 by o2 giving a float result,
963 possibly in-place, or null on failure.
965 o1 /= o2.
969 PyAPI_FUNC(PyObject *) PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2);
972 Returns the remainder of dividing o1 by o2, possibly in-place, or
974 o1 %= o2.
978 PyAPI_FUNC(PyObject *) PyNumber_InPlacePower(PyObject *o1, PyObject *o2,
982 Returns the result of raising o1 to the power of o2, possibly
983 in-place, or null on failure. This is the equivalent of the Python
984 expression: o1 **= o2, or pow(o1, o2, o3) if o3 is present.
988 PyAPI_FUNC(PyObject *) PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2);
991 Returns the result of left shifting o1 by o2, possibly in-place, or
993 o1 <<= o2.
997 PyAPI_FUNC(PyObject *) PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2);
1000 Returns the result of right shifting o1 by o2, possibly in-place or
1002 o1 >>= o2.
1006 PyAPI_FUNC(PyObject *) PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2);
1009 Returns the result of bitwise and of o1 and o2, possibly in-place,
1011 expression: o1 &= o2.
1015 PyAPI_FUNC(PyObject *) PyNumber_InPlaceXor(PyObject *o1, PyObject *o2);
1018 Returns the bitwise exclusive or of o1 by o2, possibly in-place, or
1020 o1 ^= o2.
1024 PyAPI_FUNC(PyObject *) PyNumber_InPlaceOr(PyObject *o1, PyObject *o2);
1027 Returns the result of bitwise or of o1 and o2, possibly in-place,
1029 expression: o1 |= o2.
1058 Return the size of sequence object o, or -1 on failure.
1068 PyAPI_FUNC(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2);
1071 Return the concatenation of o1 and o2 on success, and NULL on
1073 expression: o1+o2.
1106 -1 on failure; return 0 on success. This is the equivalent of the
1114 -1 on failure. This is the equivalent of the Python
1124 -1 on failure; return 0 on success. This is the
1132 Returns -1 on failure. This is the equivalent of the Python
1175 ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
1181 (PyList_Check(sf) ? ((PyListObject *)(sf))->ob_item \
1182 : ((PyTupleObject *)(sf))->ob_item)
1191 failure, return -1. This is equivalent to the Python
1197 Return -1 if error; 1 if ob in seq; 0 if ob not in seq.
1208 PY_ITERSEARCH_COUNT: return # of times obj appears in seq; -1 if
1210 PY_ITERSEARCH_INDEX: return 0-based index of first occurrence of
1211 obj in seq; set ValueError and return -1 if none found;
1212 also return -1 on error.
1213 PY_ITERSEARCH_CONTAINS: return 1 if obj in seq, else 0; -1 on
1217 /* For DLL-level backwards compatibility */
1221 /* For source-level backwards compatibility */
1226 X, return 1, otherwise return 0. On error, return -1. This
1234 return -1. This is equivalent to the Python
1238 /* In-place versions of some of the above Sequence functions. */
1240 PyAPI_FUNC(PyObject *) PySequence_InPlaceConcat(PyObject *o1, PyObject *o2);
1243 Append o2 to o1, in-place when possible. Return the resulting
1245 equivalent of the Python expression: o1 += o2.
1252 Repeat o1 by count, in-place when possible. Return the resulting
1272 Returns the number of keys in object o on success, and -1 on
1288 Returns -1 on failure. This is equivalent to
1298 Returns -1 on failure. This is equivalent to
1349 each item is a tuple containing a key-value pair. On
1369 -1 on failure. This is the equivalent of the Python