AlphaDict¶
About¶
Usage¶
API Reference¶
-
class
cawdrey.
AlphaDict
(seq=None, **kwargs)[source]¶ Initialize an immutable, Alphabetised dictionary. The signature is the same as regular dictionaries.
dict() -> new empty AlphaDict
dict(mapping) -> new AlphaDict initialized from a mapping object’s (key, value) pairs
dict(iterable) -> new AlphaDict initialized as if via:
d = {} for k, v in iterable: d[k] = v
dict(**kwargs) -> new AlphaDict initialized with the name=value pairs in the keyword argument list. For example:
dict(one=1, two=2)
-
__abstractmethods__
= frozenset({})¶
-
__annotations__
= {'dict_cls': typing.Union[typing.Type, NoneType]}¶
-
__args__
= None¶
-
__copy__
(*args, **kwargs)¶
-
__eq__
(other)¶ Return self==value.
-
__extra__
= None¶
-
__iter__
()¶
-
__module__
= 'cawdrey.alphadict'¶
-
static
__new__
(cls, *args, **kwds)¶ Create and return a new object. See help(type) for accurate signature.
-
__next_in_mro__
¶ alias of
builtins.object
-
__orig_bases__
= (cawdrey.frozenordereddict.FrozenOrderedDict[~KT, ~VT],)¶
-
__origin__
= None¶
-
__parameters__
= (~KT, ~VT)¶
-
__reversed__
= None¶
-
__slots__
= ()¶
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__tree_hash__
= -9223366107695464786¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
copy
(*args, **kwargs)¶ Return a copy of the
FrozenOrderedDict
.- Parameters
args –
kwargs –
- Returns
- Return type
-
dict_cls
¶ alias of
collections.OrderedDict
-
classmethod
fromkeys
(*args, **kwargs)¶ Returns a new dict with keys from iterable and values equal to value.
-
get
(k[, d]) → D[k] if k in D, else d. d defaults to None.¶
-
items
() → a set-like object providing a view on D’s items¶
-
keys
() → a set-like object providing a view on D’s keys¶
-
values
() → an object providing a view on D’s values¶
-