pyml

OCaml bindings for Python
IN THIS PACKAGE
Module Py . Int
val check : Object.t -> bool

check o returns true if o is a Python int.

val of_int64 : int64 -> Object.t

of_int i returns the Python int with the value i. Wrapper for PyInt_FromLong.

val to_int64 : Object.t -> int64

to_int o takes a Python int 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 PyInt_AsLong.

val of_int : int -> Object.t

of_int i returns the Python int with the value i. We have of_int i = of_int64 (Int64.of_int i).

val to_int : Object.t -> int

to_int o takes a Python int 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).

val of_string : ?base:int -> string -> Object.t

Synonym for Py.Long.of_string.

val to_string : Object.t -> string

Synonym for Py.Long.to_string.