abstract.h and with names
like: PyNumber_*.
| Modifier and Type | Field and Description |
|---|---|
| private static final MethodHandle | |
| private static final String | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Object | |
| public static Object | |
| pack-priv static final Object | |
| pack-priv static Object | |
| pack-priv static int | Returns: int value of othe object to convert to an o, Function<String, PyException> intnull or function of String returning
the exception to use for overflow.Returns |
| private static Object | |
| private static Object | Returns: result orPy.NotImplementedleft operand v, Object right operand w, Slot operation to apply binop)Helper for implementing binary operation. |
| pack-priv static Object | |
| pack-priv static boolean | |
| public static Object | |
| public static Object | |
| public static Object | |
| pack-priv static PyException | Returns: exception to throwoperation to report op, Object actual operand (only v)PyType.of(v) is used)Create a |
| pack-priv static PyException | Returns: exception to throwoperation to report op, Object left operand (only v, Object PyType.of(v) is used)right operand (only w)PyType.of(w) is used)Throw a |
| pack-priv static final Object | |
| pack-priv static int | Returns: normalised value as a Javaintto convert v, int to return when defaultValue)v==Py.NoneExtract a slice index from a Python |
| public static Object | |
| pack-priv static final Object |
| BINARY_EMPTY | back to summary |
|---|---|
| private static final MethodHandle BINARY_EMPTY | |
| CANNOT_FIT | back to summary |
|---|---|
| private static final String CANNOT_FIT | |
| CANNOT_INTERPRET_AS_INT | back to summary |
|---|---|
| private static final String CANNOT_INTERPRET_AS_INT | |
| UNSUPPORTED_TYPES | back to summary |
|---|---|
| private static final String UNSUPPORTED_TYPES | |
| PyNumber | back to summary |
|---|---|
| private PyNumber() | |
| absolute | back to summary |
|---|---|
| public static Object absolute(Object v) throws Throwable
| |
| add | back to summary |
|---|---|
| public static Object add(Object v, Object w) throws Throwable
| |
| and | back to summary |
|---|---|
| pack-priv static final Object and(Object v, Object w) throws Throwable
| |
| asLong | back to summary |
|---|---|
| pack-priv static Object asLong(Object o) throws TypeError, Throwable Returns the | |
| asSize | back to summary |
|---|---|
| pack-priv static int asSize(Object o, Function<String, PyException> exc) throws TypeError, Throwable Returns
int k = Number.asSize(key, IndexError::new);
| |
| binary_op | back to summary |
|---|---|
| private static Object binary_op(Object v, Object w, Slot binop) throws TypeError, Throwable Helper for implementing a binary operation that has one, slot-based interpretation. result of operation | |
| binary_op1 | back to summary |
|---|---|
| private static Object binary_op1(Object v, Object w, Slot binop) throws EmptyException, Throwable Helper for implementing binary operation. If neither the left
type nor the right type implements the operation, it will either
return result or
| |
| index | back to summary |
|---|---|
| pack-priv static Object index(Object o) throws TypeError, Throwable Return a Python | |
| indexCheck | back to summary |
|---|---|
| pack-priv static boolean indexCheck(Object obj) True iff the object has a slot for conversion to the index type.
| |
| invert | back to summary |
|---|---|
| public static Object invert(Object v) throws Throwable
| |
| multiply | back to summary |
|---|---|
| public static Object multiply(Object v, Object w) throws Throwable
| |
| negative | back to summary |
|---|---|
| public static Object negative(Object v) throws Throwable
| |
| operandError | back to summary |
|---|---|
| pack-priv static PyException operandError(Slot op, Object v) Create a exception to throw | |
| operandError | back to summary |
|---|---|
| pack-priv static PyException operandError(Slot op, Object v, Object w) Throw a
exception to throw | |
| or | back to summary |
|---|---|
| pack-priv static final Object or(Object v, Object w) throws Throwable
| |
| sliceIndex | back to summary |
|---|---|
| pack-priv static int sliceIndex(Object v, int defaultValue) throws TypeError, Throwable Extract a slice index from a Python
normalised value as a Java | |
| subtract | back to summary |
|---|---|
| public static Object subtract(Object v, Object w) throws Throwable
| |
| xor | back to summary |
|---|---|
| pack-priv static final Object xor(Object v, Object w) throws Throwable
| |