Home
last modified time | relevance | path

Searched refs:ChainMap (Results 1 – 23 of 23) sorted by relevance

/external/python/cpython3/Doc/library/
Dcollections.rst27 :class:`ChainMap` dict-like class for creating a single view of multiple mappings
42 :class:`ChainMap` objects
47 A :class:`ChainMap` class is provided for quickly linking a number of mappings
53 .. class:: ChainMap(*maps)
55 A :class:`ChainMap` groups multiple dicts or other mappings together to
65 A :class:`ChainMap` incorporates the underlying mappings by reference. So, if
67 in :class:`ChainMap`.
82 Returns a new :class:`ChainMap` containing a new map followed by
86 is equivalent to: ``ChainMap({}, *d.maps)``. This method is used for
95 Property returning a new :class:`ChainMap` containing all of the maps in
[all …]
Dtyping.rst713 .. class:: ChainMap(collections.ChainMap, MutableMapping[KT, VT])
715 A generic version of :class:`collections.ChainMap`.
/external/python/cpython3/Lib/test/
Dtest_collections.py19 from collections import ChainMap
58 c = ChainMap()
124 cm = ChainMap(adjustments, baseline)
132 self.assertEqual(ChainMap().maps, [{}]) # no-args --> one new dict
133 self.assertEqual(ChainMap({1:2}).maps, [{1:2}]) # 1 arg --> list
136 self.assertFalse(ChainMap())
137 self.assertFalse(ChainMap({}, {}))
138 self.assertTrue(ChainMap({1:2}, {}))
139 self.assertTrue(ChainMap({}, {1:2}))
142 class DefaultChainMap(ChainMap):
[all …]
Dtest_pprint.py879 d = collections.ChainMap()
883 d = collections.ChainMap(dict(items))
895 d = collections.ChainMap(dict(items), collections.OrderedDict(items))
Dtest_typing.py1025 class MyChain(typing.ChainMap[str, T]): ...
2096 self.assertIs(type(typing.ChainMap()), collections.ChainMap)
2097 self.assertIs(type(typing.ChainMap[KT, VT]()), collections.ChainMap)
2098 self.assertIs(type(typing.ChainMap[str, int]()), collections.ChainMap)
2099 class CM(typing.ChainMap[KT, VT]): ...
2105 class MyChainMap(typing.ChainMap[str, int]):
2111 self.assertIsSubclass(MyChainMap, collections.ChainMap)
2112 self.assertNotIsSubclass(collections.ChainMap, MyChainMap)
Dtest_pickle.py201 return collections.ChainMap({}, pickle.dispatch_table)
254 return collections.ChainMap({}, pickle.dispatch_table)
Dtest_types.py613 mapping = collections.ChainMap({'x': 1}, {'y': 2})
708 mapping = collections.ChainMap(d1, d2)
720 self.assertIsInstance(copy, collections.ChainMap)
Dtest_functools.py1743 m = mro(collections.ChainMap, haystack)
1744 self.assertEqual(m, [collections.ChainMap, c.MutableMapping, c.Mapping,
1812 g.register(collections.ChainMap, lambda obj: "chainmap")
Dtest_grammar.py15 from collections import ChainMap
/external/python/cpython3/Lib/
Dstring.py53 from collections import ChainMap as _ChainMap
Dtyping.py1247 ChainMap = _alias(collections.ChainMap, (KT, VT)) variable
Dpprint.py451 _dispatch[_collections.ChainMap.__repr__] = _pprint_chain_map
Dconfigparser.py142 from collections import OrderedDict as _default_dict, ChainMap as _ChainMap
/external/python/cpython3/Misc/NEWS.d/
D3.7.0b2.rst269 collections.ChainMap() preserves the order of the underlying mappings.
D3.6.1rc1.rst329 Various updates to typing module: typing.Counter, typing.ChainMap, improved
D3.5.4rc1.rst818 Various updates to typing module: typing.Counter, typing.ChainMap, improved
D3.7.0a1.rst3491 Various updates to typing module: typing.Counter, typing.ChainMap, improved
/external/python/cpython3/Lib/collections/
D__init__.py884 class ChainMap(_collections_abc.MutableMapping): class
/external/python/cpython3/Lib/unittest/
Dcase.py341 class _OrderedChainMap(collections.ChainMap):
/external/python/cpython3/Doc/whatsnew/
D3.3.rst1020 Addition of a new :class:`~collections.ChainMap` class to allow treating a
D3.7.rst2416 * :class:`collections.ChainMap` now preserves the order of the underlying
D3.4.rst664 The :meth:`.ChainMap.new_child` method now accepts an *m* argument specifying
/external/python/cpython3/Misc/
DHISTORY9187 - Issue #12959: Add collections.ChainMap to collections.__all__.
10023 - Issue #11297: Add collections.ChainMap().