package pyml

  1. Overview
  2. Docs

Module Py.SetSource

Interface for Python values of type Set.

Sourceval check : Object.t -> bool

check o returns true if o is a Python set.

Sourceval add : Object.t -> Object.t -> unit

Wrapper for PySet_Add

Sourceval clear : Object.t -> unit

Wrapper for PySet_Clear

Sourceval contains : Object.t -> Object.t -> bool

Wrapper for PySet_Contains

Sourceval copy : Object.t -> Object.t

Wrapper for PySet_New

Sourceval create : unit -> Object.t

Wrapper for PySet_New

Sourceval discard : Object.t -> Object.t -> unit

Wrapper for PySet_Discard

Sourceval size : Object.t -> int

Wrapper for PySet_Size

Sourceval to_list : Object.t -> Object.t list

to_list o returns the list of all elements in Python set o.

Sourceval to_list_map : (Object.t -> 'a) -> Object.t -> 'a list

to_list_map f o returns the list of f v for all elements v in Python set o.

Sourceval of_list : Object.t list -> Object.t

of_list l returns then Python set containing all elements from l.

Sourceval of_list_map : ('a -> Object.t) -> 'a list -> Object.t

of_list_map f l returns then Python set containing f e for any e from l.

OCaml

Innovation. Community. Security.