Module Py__Py_base.Object
Object defines functions for working with generic Python objects
type t= pyobjectt is a pointer to PyObject
val is_null : t -> boolReturns true if an object is null
val is_none : t -> boolReturns true if an object is None
val incref : t -> unitIncrements reference count for an object
val decref : t -> unitDecrements reference count for an object
val length : t -> int64Returns the length of an object
val del_item_s : t -> string -> unitDeletes the item at the given string index
val del_item_i : t -> int -> unitDeletes the item at the given integer index
val get_attr : t -> t -> tval get_attr_s : t -> string -> tval del_attr : t -> t -> unitval del_attr_s : t -> string -> unitval set_attr : t -> t -> t -> unitval set_attr_s : t -> string -> t -> unitval has_attr : t -> t -> boolval has_attr_s : t -> string -> boolval to_string : t -> stringConvert an object to OCaml string
val to_bytes : t -> bytesConvert an object to OCaml bytes
val to_int : t -> intConvert an object to OCaml int
val to_int64 : t -> int64Convert an object to OCaml int64
val to_float : t -> floatConvert an object to OCaml float
val to_bool : t -> boolConvert an object to OCaml bool
val from_bool : bool -> tCreate a boolean object
val none : unit -> tval compare : t -> t -> op -> boolval to_array : (t -> 'a) -> t -> 'a arrayval to_list : (t -> 'a) -> t -> 'a listval contains : t -> t -> boolval concat : t -> t -> tval call : ?args:t array -> ?kwargs:(t * t) list -> t -> tCall a Python Object
val call_method : ?args:t array -> ?kwargs:(t * t) list -> t -> string -> tCall a method on Python Object
val pp : Stdlib.Format.formatter -> t -> unitTop-level pretty printer.