/external/python/cpython2/Lib/test/ |
D | test_dict.py | 211 self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 213 self.assertIsNot(d.fromkeys('abc'), d) 214 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 215 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) 216 self.assertEqual(d.fromkeys([]), {}) 219 self.assertEqual(d.fromkeys(g()), {1:None}) 220 self.assertRaises(TypeError, {}.fromkeys, 3) 222 self.assertEqual(dictlike.fromkeys('a'), {'a':None}) 223 self.assertEqual(dictlike().fromkeys('a'), {'a':None}) 224 self.assertIsInstance(dictlike.fromkeys('a'), dictlike) [all …]
|
D | mapping_tests.py | 441 self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 443 self.assertTrue(not(d.fromkeys('abc') is d)) 444 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 445 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) 446 self.assertEqual(d.fromkeys([]), {}) 449 self.assertEqual(d.fromkeys(g()), {1:None}) 450 self.assertRaises(TypeError, {}.fromkeys, 3) 452 self.assertEqual(dictlike.fromkeys('a'), {'a':None}) 453 self.assertEqual(dictlike().fromkeys('a'), {'a':None}) 454 self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike) [all …]
|
D | test_userdict.py | 40 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split()), d4) 41 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split()), d4) 42 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split(), 1), d5) 43 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split(), 1), d5) 44 self.assertTrue(u1.fromkeys('one two'.split()) is not u1) 45 self.assertIsInstance(u1.fromkeys('one two'.split()), UserDict.UserDict) 46 self.assertIsInstance(u2.fromkeys('one two'.split()), UserDict.IterableUserDict) 277 def fromkeys(cls, keys, value=None): member in SeqDict
|
D | test_iterlen.py | 133 d = dict.fromkeys(xrange(n)) 140 d = dict.fromkeys(xrange(n)) 147 d = dict.fromkeys(xrange(n))
|
D | test_set.py | 47 self.d = dict.fromkeys(word) 78 for C in set, frozenset, dict.fromkeys, str, unicode, list, tuple: 107 for C in set, frozenset, dict.fromkeys, str, unicode, list, tuple: 127 for C in set, frozenset, dict.fromkeys, str, unicode, list, tuple: 153 for C in set, frozenset, dict.fromkeys, str, unicode, list, tuple: 180 for C in set, frozenset, dict.fromkeys, str, unicode, list, tuple: 314 d = dict.fromkeys(map(HashCountingInt, xrange(n))) 323 d2 = dict.fromkeys(set(d)) 325 d3 = dict.fromkeys(frozenset(d)) 327 d3 = dict.fromkeys(frozenset(d), 123) [all …]
|
D | test_ordered_dict.py | 218 od = OrderedDict.fromkeys('abc') 266 od = OrderedDict.fromkeys(s)
|
D | test_weakset.py | 51 self.d = dict.fromkeys(self.items) 88 for C in set, frozenset, dict.fromkeys, list, tuple: 110 for C in set, frozenset, dict.fromkeys, list, tuple:
|
/external/python/cpython3/Lib/test/ |
D | mapping_tests.py | 424 self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 426 self.assertTrue(not(d.fromkeys('abc') is d)) 427 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 428 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) 429 self.assertEqual(d.fromkeys([]), {}) 432 self.assertEqual(d.fromkeys(g()), {1:None}) 433 self.assertRaises(TypeError, {}.fromkeys, 3) 435 self.assertEqual(dictlike.fromkeys('a'), {'a':None}) 436 self.assertEqual(dictlike().fromkeys('a'), {'a':None}) 437 self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike) [all …]
|
D | test_userdict.py | 39 self.assertEqual(collections.UserDict.fromkeys('one two'.split()), d4) 40 self.assertEqual(collections.UserDict().fromkeys('one two'.split()), d4) 41 self.assertEqual(collections.UserDict.fromkeys('one two'.split(), 1), d5) 42 self.assertEqual(collections.UserDict().fromkeys('one two'.split(), 1), d5) 43 self.assertTrue(u1.fromkeys('one two'.split()) is not u1) 44 self.assertIsInstance(u1.fromkeys('one two'.split()), collections.UserDict) 45 self.assertIsInstance(u2.fromkeys('one two'.split()), collections.UserDict)
|
D | test_dict.py | 248 self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 250 self.assertIsNot(d.fromkeys('abc'), d) 251 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) 252 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) 253 self.assertEqual(d.fromkeys([]), {}) 256 self.assertEqual(d.fromkeys(g()), {1:None}) 257 self.assertRaises(TypeError, {}.fromkeys, 3) 259 self.assertEqual(dictlike.fromkeys('a'), {'a':None}) 260 self.assertEqual(dictlike().fromkeys('a'), {'a':None}) 261 self.assertIsInstance(dictlike.fromkeys('a'), dictlike) [all …]
|
D | test_iterlen.py | 118 d = dict.fromkeys(range(n)) 125 d = dict.fromkeys(range(n)) 132 d = dict.fromkeys(range(n))
|
D | test_ordered_dict.py | 124 od = OrderedDict.fromkeys('abc') 126 od = OrderedDict.fromkeys('abc', value=None) 128 od = OrderedDict.fromkeys('abc', value=0) 182 od = OrderedDict.fromkeys('abc') 353 od = OrderedDict.fromkeys('abc') 406 od = OrderedDict.fromkeys('abcde') 425 od = OrderedDict.fromkeys('abc') 431 od = OrderedDict.fromkeys('abc') 448 od = OrderedDict.fromkeys(s) 768 od = OrderedDict.fromkeys('abcde')
|
D | test_set.py | 48 self.d = dict.fromkeys(word) 79 for C in set, frozenset, dict.fromkeys, str, list, tuple: 108 for C in set, frozenset, dict.fromkeys, str, list, tuple: 128 for C in set, frozenset, dict.fromkeys, str, list, tuple: 154 for C in set, frozenset, dict.fromkeys, str, list, tuple: 181 for C in set, frozenset, dict.fromkeys, str, list, tuple: 336 d = dict.fromkeys(map(HashCountingInt, range(n))) 345 d2 = dict.fromkeys(set(d)) 347 d3 = dict.fromkeys(frozenset(d)) 349 d3 = dict.fromkeys(frozenset(d), 123) [all …]
|
D | test_pprint.py | 298 d = dict.fromkeys('cba') 699 self.assertEqual(clean(pprint.pformat(dict.fromkeys(keys))), 708 self.assertEqual(pprint.pformat(dict.fromkeys(keys, 0)), 726 self.assertEqual(pprint.pformat(dict.fromkeys([b, a]), width=1), 728 self.assertEqual(pprint.pformat(dict.fromkeys([a, b]), width=1),
|
D | test_contains.py | 74 constructors = list, tuple, dict.fromkeys, set, frozenset, deque
|
D | test_weakset.py | 32 self.d = dict.fromkeys(self.items) 69 for C in set, frozenset, dict.fromkeys, list, tuple: 91 for C in set, frozenset, dict.fromkeys, list, tuple:
|
/external/autotest/frontend/tko/ |
D | preconfigs.py | 27 self._preconfigs['metrics'] = dict.fromkeys( 29 self._preconfigs['qual'] = dict.fromkeys(
|
/external/autotest/client/cros/video/ |
D | arc_device_capability.py | 52 arc_caps = dict.fromkeys(self.MEDIA_CODEC_TO_CAPABILITY.values(), 'no')
|
D | device_capability.py | 71 autotest_caps = dict.fromkeys(managed_caps, 'no')
|
/external/python/cpython3/Lib/collections/ |
D | __init__.py | 293 def fromkeys(cls, iterable, value=None): member in OrderedDict 638 def fromkeys(cls, iterable, v=None): member in Counter 952 d.update(dict.fromkeys(mapping)) # reuses stored hash values if possible 966 def fromkeys(cls, iterable, *args): member in ChainMap 968 return cls(dict.fromkeys(iterable, *args)) 1119 def fromkeys(cls, iterable, value=None): member in UserDict
|
/external/python/asn1crypto/asn1crypto/ |
D | _ordereddict.py | 118 def fromkeys(cls, iterable, value=None): member in OrderedDict
|
/external/python/cpython2/Doc/howto/ |
D | descriptor.rst | 406 :func:`dict.fromkeys` creates a new dictionary from a list of keys. The pure 411 def fromkeys(klass, iterable, value=None): 417 fromkeys = classmethod(fromkeys) 421 >>> Dict.fromkeys('abracadabra')
|
/external/python/cpython2/Lib/ |
D | collections.py | 209 def fromkeys(cls, iterable, value=None): member in OrderedDict 522 def fromkeys(cls, iterable, v=None): member in Counter
|
/external/python/funcsigs/funcsigs/ |
D | odict.py | 227 def fromkeys(cls, iterable, value=None): member in OrderedDict
|
/external/python/setuptools/setuptools/command/ |
D | bdist_egg.py | 355 NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split()) 425 symbols = dict.fromkeys(iter_symbols(code))
|