Home
last modified time | relevance | path

Searched refs:ChainMap (Results 1 - 14 of 14) sorted by relevance

/third_party/python/Lib/test/
H A Dtest_collections.py19 from collections import ChainMap namespace
76 ### ChainMap (helper class for configparser and the string module)
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({}, {
[all...]
H A Dtest_pickle.py229 return collections.ChainMap({}, pickle.dispatch_table)
289 return collections.ChainMap({}, pickle.dispatch_table)
H A Dtest_pprint.py1107 d = collections.ChainMap()
1108 self.assertEqual(pprint.pformat(d, width=1), "ChainMap({})")
1111 d = collections.ChainMap(dict(items))
1114 ChainMap({'a': 6,
1123 d = collections.ChainMap(dict(items), collections.OrderedDict(items))
1126 ChainMap({'a': 6,
H A Dtest_typing.py3833 class MyChain(typing.ChainMap[str, T]): ...
5828 self.assertIs(type(typing.ChainMap()), collections.ChainMap)
5829 self.assertIs(type(typing.ChainMap[KT, VT]()), collections.ChainMap)
5830 self.assertIs(type(typing.ChainMap[str, int]()), collections.ChainMap)
5831 class CM(typing.ChainMap[KT, VT]): ...
5836 class MyChainMap(typing.ChainMap[str, int]):
5842 self.assertIsSubclass(MyChainMap, collections.ChainMap)
[all...]
H A Dtest_types.py1042 mapping = collections.ChainMap({'x': 1}, {'y': 2})
1142 mapping = collections.ChainMap(d1, d2)
1154 self.assertIsInstance(copy, collections.ChainMap)
H A Dtest_functools.py1985 m = mro(collections.ChainMap, haystack)
1986 self.assertEqual(m, [collections.ChainMap, c.MutableMapping, c.Mapping,
2054 g.register(collections.ChainMap, lambda obj: "chainmap")
H A Dtest_grammar.py18 from collections import ChainMap namespace
/third_party/python/Lib/
H A Dstring.py53 from collections import ChainMap as _ChainMap
H A Dpprint.py514 _dispatch[_collections.ChainMap.__repr__] = _pprint_chain_map
H A Dtyping.py100 'ChainMap',
2732 ChainMap = _alias(collections.ChainMap, 2) variable
H A Dconfigparser.py143 from collections import ChainMap as _ChainMap
/third_party/jinja2/
H A Denvironment.py8 from collections import ChainMap namespace
962 # template.globals is a ChainMap, modifying it will only
1113 Returns a :class:`collections.ChainMap`. This allows any changes
1121 Use :class:`collections.ChainMap` to always prevent mutating
1127 return ChainMap(d, self.globals)
/third_party/python/Lib/unittest/
H A Dcase.py334 class _OrderedChainMap(collections.ChainMap):
/third_party/python/Lib/collections/
H A D__init__.py7 * ChainMap dict-like class for creating a single view of multiple mappings
18 'ChainMap',
971 ### ChainMap
974 class ChainMap(_collections_abc.MutableMapping): class
975 ''' A ChainMap groups multiple dicts (or other mappings) together
989 '''Initialize a ChainMap by setting *maps* to the given mappings.
1030 'Create a ChainMap with a single dict created from the iterable.'
1034 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'
1040 '''New ChainMap with a new map followed by all previous maps.
1052 'New ChainMap fro
[all...]

Completed in 44 milliseconds