GNU Info

Info Node: (python2.1-api.info)Long Integer Objects

(python2.1-api.info)Long Integer Objects


Next: Floating Point Objects Prev: Plain Integer Objects Up: Numeric Objects
Enter node , (file) or (file)node

Long Integer Objects
--------------------

`PyLongObject'
     This subtype of `PyObject' represents a Python long integer object.

`PyTypeObject PyLong_Type'
     This instance of `PyTypeObject' represents the Python long integer
     type.  This is the same object as `types.LongType'.

`int PyLong_Check(PyObject *p)'
     Returns true if its argument is a `PyLongObject'.

`PyObject* PyLong_FromLong(long v)'
     Returns a new `PyLongObject' object from V, or `NULL' on failure.

`PyObject* PyLong_FromUnsignedLong(unsigned long v)'
     Returns a new `PyLongObject' object from a C `unsigned long', or
     `NULL' on failure.

`PyObject* PyLong_FromDouble(double v)'
     Returns a new `PyLongObject' object from the integer part of V, or
     `NULL' on failure.

`long PyLong_AsLong(PyObject *pylong)'
     Returns a C `long' representation of the contents of PYLONG.  If
     PYLONG is greater than `LONG_MAX' , an `OverflowError' is raised.

`unsigned long PyLong_AsUnsignedLong(PyObject *pylong)'
     Returns a C `unsigned long' representation of the contents of
     PYLONG.  If PYLONG is greater than `ULONG_MAX' , an `OverflowError'
     is raised.

`double PyLong_AsDouble(PyObject *pylong)'
     Returns a C `double' representation of the contents of PYLONG.

`PyObject* PyLong_FromString(char *str, char **pend, int base)'
     Return a new `PyLongObject' based on the string value in STR,
     which is interpreted according to the radix in BASE.  If PEND is
     non-`NULL', `*PEND' will point to the first character in STR which
     follows the representation of the number.  If BASE is `0', the
     radix will be determined base on the leading characters of STR: if
     STR starts with `'0x'' or `'0X'', radix 16 will be used; if STR
     starts with `'0'', radix 8 will be used; otherwise radix 10 will be
     used.  If BASE is not `0', it must be between `2' and `36',
     inclusive.  Leading spaces are ignored.  If there are no digits,
     `ValueError' will be raised.


automatically generated by info2www version 1.2.2.9