constantdict#
- class constantdict.constantdict[source]#
-
An immutable dictionary.
- classmethod fromkeys(*args: Any, **kwargs: Any) Any [source]#
Create a new
constantdict
from supplied keys and values.
- __hash__() int [source]#
Return the hash of this
constantdict
.
- __repr__() str [source]#
Return a string representation of this
constantdict
.
- __or__(other: Any) constantdict[K, V] [source]#
Return the union of this
constantdict
and other.
- set(key: K, val: V) constantdict[K, V] [source]#
Return a new
constantdict
with the item at key set to val.
- delete(key: K) constantdict[K, V] [source]#
Return a new
constantdict
without the item at the given key.
- remove(key: K) constantdict[K, V] [source]#
Return a new
constantdict
without the item at the given key.
- update(other: Dict[K, V]) constantdict[K, V] [source]#
Return a new
constantdict
with updated items from other.
- discard(key: K) constantdict[K, V] [source]#
Return a new
constantdict
without the item at the given key.Return a reference to itself if the key is not present.
- __delitem__(*args: Any, **kwargs: Any) None [source]#
Raise an AttributeError when trying to modify the object.
- __ior__(*args: Any, **kwargs: Any) None [source]#
Raise an AttributeError when trying to modify the object.
- __setitem__(*args: Any, **kwargs: Any) None [source]#
Raise an AttributeError when trying to modify the object.
- clear(*args: Any, **kwargs: Any) None [source]#
Raise an AttributeError when trying to modify the object.
- popitem(*args: Any, **kwargs: Any) None [source]#
Raise an AttributeError when trying to modify the object.
Internal stuff that is only here because the documentation tool wants it#
- class constantdict.K#
- class constantdict.V#