Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Py.LongSourceInterface for Python values of type Long.
of_int i returns the Python long with the value i. Wrapper for PyLong_FromLong.
to_int o takes a Python long o as arguments and returns the corresponding 64-bit integer value. A Python exception (Py.E _) is raised if o is not a long. Wrapper for PyLong_AsLong.
of_int i returns the Python long with the value i. We have of_int i = of_int64 (Int64.of_int i).
to_int o takes a Python long o as arguments and returns the corresponding integer value. A Python exception (Py.E _) is raised if o is not a long. We have to_int o = Int64.to_int (to_int 64 o).
from_string s base parses s as a number written in base and returns (o, l) where o is the Python long which has been read, and l is the number of characters that has been parsed. Wrapper for PyLong_FromString.
of_string ?base s parses s and returns the Python long that has been read. By default, base is 0: the radix is determined based on the leading characters of s.