Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Interface for Python values of type Dict
.
val check : Object.t -> bool
check o
returns true
if o
is a Python dictionary.
val clear : Object.t -> unit
Wrapper for PyDict_Clear
Wrapper for PyDict_Copy
val create : unit -> Object.t
Wrapper for PyDict_New
Wrapper for PyDict_DelItem
val del_item_string : Object.t -> string -> unit
Wrapper for PyDict_DelItemString
Wrapper for PyDict_GetItem
find p key
returns the object from Python dictionary p
which has a key key
. Equivalent to get_item
but find
raises Not_found
if the key key
is not present.
Wrapper for PyDict_GetItemString
find_string p key
returns the object from Python dictionary p
which has a key key
. Equivalent to get_item_string
but find_string
raises Not_found
if the key key
is not present.
Alias for get_item_string
.
Wrapper for PyDict_Keys
Wrapper for PyDict_Items
Wrapper for PyDict_SetItem
Wrapper for PyDict_SetItemString
val size : Object.t -> int
Wrapper for PyDict_Size
Wrapper for PyDict_Str
iter f dict
applies f key value
for each pair (key, value)
in the Python dictionary dict
.
fold f dict v
returns f key1 value1 (... (f keyn valuen dict))
where (key1, value1)
, ..., (keyn, valuen)
are the bindings of the Python dictionary dict
.
for_all p dict
checks whether all the bindings (key, value)
of the Python dictionary dict
satisfy the predicate p key value
.
for_all p dict
checks that there is at least one binding (key, value)
among those of the Python dictionary dict
that satisfies the predicate p key value
.
to_bindings o
returns all the pairs (key, value)
in the Python dictionary o
.
to_bindings_map fkey fvalue o
returns all the pairs (fkey key, fvalue value)
in the Python dictionary o
.
to_bindings_string o
returns all the pairs (key, value)
in the Python dictionary o
.
val to_bindings_seq : Object.t -> (Object.t * Object.t) Stdcompat.Seq.t
to_bindings_seq o
returns the ephemeral sequence of all the pairs (key, value) in the Python dictionary o
.
val to_bindings_seq_map :
(Object.t -> 'a) ->
(Object.t -> 'b) ->
Object.t ->
('a * 'b) Stdcompat.Seq.t
to_bindings_seq_map fkey fvalue o
returns the ephemeral sequence of all the pairs (fkey key, fvalue value) in the Python dictionary o
.
val to_bindings_string_seq : Object.t -> (string * Object.t) Stdcompat.Seq.t
to_bindings_string_seq o
returns the ephemeral sequence of all the pairs (key, value) in the Python dictionary o
.
of_bindings b
returns then Python dictionary mapping all the pairs (key, value)
in b
.
of_bindings_map fkey fvalue b
returns then Python dictionary mapping all the pairs (fkey key, fvalue value)
in b
.
of_bindings_string b
returns then Python dictionary mapping all the pairs (key, value)
in b
.
singleton key value
returns the one-element Python dictionary that maps key
to value