Searched refs:fromkeys (Results 1 - 25 of 44) sorted by relevance

12

/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/
H A Dtest_dict.py208 self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
210 self.assertIsNot(d.fromkeys('abc'), d)
211 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
212 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
213 self.assertEqual(d.fromkeys([]), {})
216 self.assertEqual(d.fromkeys(g()), {1:None})
217 self.assertRaises(TypeError, {}.fromkeys, 3)
219 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
220 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
221 self.assertIsInstance(dictlike.fromkeys('
[all...]
H A Dtest_userdict.py37 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split()), d4)
38 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split()), d4)
39 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split(), 1), d5)
40 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split(), 1), d5)
41 self.assertTrue(u1.fromkeys('one two'.split()) is not u1)
42 self.assertIsInstance(u1.fromkeys('one two'.split()), UserDict.UserDict)
43 self.assertIsInstance(u2.fromkeys('one two'.split()), UserDict.IterableUserDict)
244 def fromkeys(cls, keys, value=None): member in class:SeqDict
H A Dmapping_tests.py440 self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
442 self.assertTrue(not(d.fromkeys('abc') is d))
443 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
444 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
445 self.assertEqual(d.fromkeys([]), {})
448 self.assertEqual(d.fromkeys(g()), {1:None})
449 self.assertRaises(TypeError, {}.fromkeys, 3)
451 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
452 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
453 self.assertTrue(dictlike.fromkeys('
[all...]
H A Dtest_iterlen.py133 d = dict.fromkeys(xrange(n))
140 d = dict.fromkeys(xrange(n))
147 d = dict.fromkeys(xrange(n))
H A Dtest_set.py47 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(frozense
[all...]
H A Dtest_importhooks.py93 self.namestoblock = dict.fromkeys(namestoblock)
H A Dtest_weakset.py51 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:
H A Dtest_collections.py221 methodstubs = dict.fromkeys(names, lambda s, *args: 0)
649 self.assertRaises(NotImplementedError, Counter.fromkeys, 'abc')
752 self.assertEqual(counter_result, dict.fromkeys(set_result, 1))
966 od = OrderedDict.fromkeys('abc')
1001 od = OrderedDict.fromkeys(s)
H A Dtest_random.py108 self.gen.sample(dict.fromkeys('abcdefghijklmnopqrst'), 2)
111 a = dict.fromkeys(range(10)+range(10,100,2)+range(100,110))
H A Dpickletester.py861 x = dict.fromkeys(range(n))
870 x = dict.fromkeys(range(n))
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/
H A Dtest_dict.py208 self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
210 self.assertIsNot(d.fromkeys('abc'), d)
211 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
212 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
213 self.assertEqual(d.fromkeys([]), {})
216 self.assertEqual(d.fromkeys(g()), {1:None})
217 self.assertRaises(TypeError, {}.fromkeys, 3)
219 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
220 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
221 self.assertIsInstance(dictlike.fromkeys('
[all...]
H A Dtest_userdict.py37 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split()), d4)
38 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split()), d4)
39 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split(), 1), d5)
40 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split(), 1), d5)
41 self.assertTrue(u1.fromkeys('one two'.split()) is not u1)
42 self.assertIsInstance(u1.fromkeys('one two'.split()), UserDict.UserDict)
43 self.assertIsInstance(u2.fromkeys('one two'.split()), UserDict.IterableUserDict)
244 def fromkeys(cls, keys, value=None): member in class:SeqDict
H A Dmapping_tests.py440 self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
442 self.assertTrue(not(d.fromkeys('abc') is d))
443 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
444 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
445 self.assertEqual(d.fromkeys([]), {})
448 self.assertEqual(d.fromkeys(g()), {1:None})
449 self.assertRaises(TypeError, {}.fromkeys, 3)
451 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
452 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
453 self.assertTrue(dictlike.fromkeys('
[all...]
H A Dtest_iterlen.py133 d = dict.fromkeys(xrange(n))
140 d = dict.fromkeys(xrange(n))
147 d = dict.fromkeys(xrange(n))
H A Dtest_set.py47 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(frozense
[all...]
H A Dtest_importhooks.py93 self.namestoblock = dict.fromkeys(namestoblock)
H A Dtest_weakset.py51 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:
H A Dtest_collections.py221 methodstubs = dict.fromkeys(names, lambda s, *args: 0)
649 self.assertRaises(NotImplementedError, Counter.fromkeys, 'abc')
752 self.assertEqual(counter_result, dict.fromkeys(set_result, 1))
966 od = OrderedDict.fromkeys('abc')
1001 od = OrderedDict.fromkeys(s)
H A Dtest_random.py108 self.gen.sample(dict.fromkeys('abcdefghijklmnopqrst'), 2)
111 a = dict.fromkeys(range(10)+range(10,100,2)+range(100,110))
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/
H A Dcollections.py192 def fromkeys(cls, iterable, value=None): member in class:OrderedDict
193 '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S.
489 def fromkeys(cls, iterable, v=None): member in class:Counter
493 'Counter.fromkeys() is undefined. Use Counter(iterable) instead.')
H A DUserDict.py73 def fromkeys(cls, iterable, value=None): member in class:UserDict
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/
H A Dcollections.py192 def fromkeys(cls, iterable, value=None): member in class:OrderedDict
193 '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S.
489 def fromkeys(cls, iterable, v=None): member in class:Counter
493 'Counter.fromkeys() is undefined. Use Counter(iterable) instead.')
H A DUserDict.py73 def fromkeys(cls, iterable, value=None): member in class:UserDict
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/distutils/tests/
H A Dsetuptools_build_ext.py190 libnames = dict.fromkeys([lib._full_name for lib in self.shlibs])
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/distutils/tests/
H A Dsetuptools_build_ext.py190 libnames = dict.fromkeys([lib._full_name for lib in self.shlibs])

Completed in 1615 milliseconds

12