Types
PyDictItemView[K; V] = object of PyDictView mapping*: PyDict[K, V]
- Source Edit
PyDictKeyView[T] = object of PyDictView mapping*: PyDict[T, auto]
- Source Edit
PyDictValueView[T] = object of PyDictView mapping*: PyDict[auto, T]
- Source Edit
PyDictView = object of RootObj
-
Warning: currently mapping attr is dict itself, i.e. modifiableSource Edit
SomeSinglePyDictView[T] = PyDictValueView[T] | PyDictKeyView[T]
- Source Edit
Procs
func contains[K, V](t: PyDictItemView[K, V]; x: (K, V)): bool
- Source Edit
func contains[T](t: PyDictKeyView[T]; x: T): bool
- Source Edit
func contains[T](t: PyDictValueView[T]; x: T): bool
- Source Edit
func items[K, V](self: PyDict[K, V]): PyDictItemView[K, V]
- Source Edit
func iter[K, V](self: PyDict[K, V]): PyIterator[K]
- Source Edit
func keys[K, V](self: PyDict[K, V]): PyDictKeyView[K]
- Source Edit
proc len(view: SomePyDictView): int
- Source Edit
func setdefault[K, V](self: PyDict[K, V]; key: K; default = V.default)
-
Warning: default defaults to V.default instead of NoneSource Edit
func values[K, V](self: PyDict[K, V]): PyDictValueView[V]
- Source Edit
Templates
template `$`(view`gensym1: PyDictKeyView): string
- Source Edit
template `$`(view`gensym2: PyDictValueView): string
- Source Edit
template `$`(view`gensym3: PyDictItemView): string
- Source Edit
template items(view: SomePyDictView): untyped
- Source Edit
template iter(view: SomePyDictView): untyped
- Source Edit