package py

  1. Overview
  2. Docs

Module Py.PyWrapSource

Sourcemodule W : sig ... end
Sourcetype 'a t
Sourceval returning : 'a W.t -> 'a t
Sourceval (@->) : 'a W.t -> 'b t -> ('a -> 'b) t
Sourceval none : unit W.t
Sourceval bool : bool W.t
Sourceval int : int W.t
Sourceval float : float W.t
Sourceval string : string W.t
Sourceval list : 'a W.t -> 'a list W.t
Sourceval dict : 'a W.t -> 'b W.t -> ('a * 'b) list W.t
Sourceval tuple2 : 'a1 W.t -> 'a2 W.t -> ('a1 * 'a2) W.t
Sourceval tuple3 : 'a1 W.t -> 'a2 W.t -> 'a3 W.t -> ('a1 * 'a2 * 'a3) W.t
Sourceval tuple4 : 'a1 W.t -> 'a2 W.t -> 'a3 W.t -> 'a4 W.t -> ('a1 * 'a2 * 'a3 * 'a4) W.t
Sourceval tuple5 : 'a1 W.t -> 'a2 W.t -> 'a3 W.t -> 'a4 W.t -> 'a5 W.t -> ('a1 * 'a2 * 'a3 * 'a4 * 'a5) W.t
Sourceval pyobject : Py__.Py_base.pyobject W.t
Sourceval python_fn : 'a t -> Py__.Py_base.pyobject -> 'a

python_fn t pyobject wraps a python function pyobject so that it can be used in a type-safe way.

Sourceval ocaml_fn : 'a t -> 'a -> Py__.Py_base.pyobject -> Py__.Py_base.pyobject

ocaml_fn t f wraps an ocaml function f so that it can be used from python. E.g. it could get registered via CamlModule.add_fn. Note that even if some argument conversion fails, f will have been partially applied up to this point.

Sourceval to_string : 'a t -> string
OCaml

Innovation. Community. Security.