Home
last modified time | relevance | path

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

12

/third_party/python/Lib/test/
Dtest_collections.py19 from collections import ChainMap
82 c = ChainMap()
148 cm = ChainMap(adjustments, baseline)
156 self.assertEqual(ChainMap().maps, [{}]) # no-args --> one new dict
157 self.assertEqual(ChainMap({1:2}).maps, [{1:2}]) # 1 arg --> list
160 self.assertFalse(ChainMap())
161 self.assertFalse(ChainMap({}, {}))
162 self.assertTrue(ChainMap({1:2}, {}))
163 self.assertTrue(ChainMap({}, {1:2}))
166 class DefaultChainMap(ChainMap):
[all …]
Dtest_pickle.py206 return collections.ChainMap({}, pickle.dispatch_table)
266 return collections.ChainMap({}, pickle.dispatch_table)
Dtest_pprint.py1099 d = collections.ChainMap()
1103 d = collections.ChainMap(dict(items))
1115 d = collections.ChainMap(dict(items), collections.OrderedDict(items))
Dtest_typing.py2062 class MyChain(typing.ChainMap[str, T]): ...
3579 self.assertIs(type(typing.ChainMap()), collections.ChainMap)
3580 self.assertIs(type(typing.ChainMap[KT, VT]()), collections.ChainMap)
3581 self.assertIs(type(typing.ChainMap[str, int]()), collections.ChainMap)
3582 class CM(typing.ChainMap[KT, VT]): ...
3588 class MyChainMap(typing.ChainMap[str, int]):
3594 self.assertIsSubclass(MyChainMap, collections.ChainMap)
3595 self.assertNotIsSubclass(collections.ChainMap, MyChainMap)
4839 typing.ChainMap: 'ChainMap',
4878 typing.ChainMap[Any, Any]: 'ChainMap',
Dtest_types.py961 mapping = collections.ChainMap({'x': 1}, {'y': 2})
1061 mapping = collections.ChainMap(d1, d2)
1073 self.assertIsInstance(copy, collections.ChainMap)
Dtest_functools.py1888 m = mro(collections.ChainMap, haystack)
1889 self.assertEqual(m, [collections.ChainMap, c.MutableMapping, c.Mapping,
1957 g.register(collections.ChainMap, lambda obj: "chainmap")
Dtest_grammar.py18 from collections import ChainMap
/third_party/python/Doc/library/
Dcollections.rst27 :class:`ChainMap` dict-like class for creating a single view of multiple mappings
37 :class:`ChainMap` objects
42 A :class:`ChainMap` class is provided for quickly linking a number of mappings
48 .. class:: ChainMap(*maps)
50 A :class:`ChainMap` groups multiple dicts or other mappings together to
60 A :class:`ChainMap` incorporates the underlying mappings by reference. So, if
62 in :class:`ChainMap`.
77 Returns a new :class:`ChainMap` containing a new map followed by
81 is equivalent to: ``ChainMap({}, *d.maps)``. If any keyword arguments
94 Property returning a new :class:`ChainMap` containing all of the maps in
[all …]
Dtyping.rst1499 .. class:: ChainMap(collections.ChainMap, MutableMapping[KT, VT])
1501 A generic version of :class:`collections.ChainMap`.
1507 :class:`collections.ChainMap` now supports ``[]``. See :pep:`585` and
/third_party/python/Lib/
Dstring.py53 from collections import ChainMap as _ChainMap
Dtyping.py2126 ChainMap = _alias(collections.ChainMap, 2) variable
Dpprint.py513 _dispatch[_collections.ChainMap.__repr__] = _pprint_chain_map
Dconfigparser.py142 from collections import ChainMap as _ChainMap
/third_party/python/Misc/NEWS.d/
D3.7.0b2.rst268 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.rst817 Various updates to typing module: typing.Counter, typing.ChainMap, improved
D3.10.0a7.rst482 Add keyword arguments support to ``ChainMap.new_child()``.
D3.9.0a6.rst808 :class:`collections.ChainMap`.
D3.10.0a3.rst333 ChainMap.__iter__ no longer calls __getitem__ on underlying maps
D3.8.0b1.rst791 Add missing names to ``typing.__all__``: ``ChainMap``, ``ForwardRef``,
D3.7.0a1.rst3486 Various updates to typing module: typing.Counter, typing.ChainMap, improved
/third_party/python/Lib/unittest/
Dcase.py298 class _OrderedChainMap(collections.ChainMap):
/third_party/python/Lib/collections/
D__init__.py952 class ChainMap(_collections_abc.MutableMapping): class
/third_party/python/Doc/whatsnew/
D3.3.rst1020 Addition of a new :class:`~collections.ChainMap` class to allow treating a
D3.7.rst2428 * :class:`collections.ChainMap` now preserves the order of the underlying

12