Lines Matching refs:fromkeys
268 self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
270 self.assertIsNot(d.fromkeys('abc'), d)
271 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
272 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
273 self.assertEqual(d.fromkeys([]), {})
276 self.assertEqual(d.fromkeys(g()), {1:None})
277 self.assertRaises(TypeError, {}.fromkeys, 3)
279 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
280 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
281 self.assertIsInstance(dictlike.fromkeys('a'), dictlike)
282 self.assertIsInstance(dictlike().fromkeys('a'), dictlike)
286 ud = mydict.fromkeys('ab')
289 self.assertRaises(TypeError, dict.fromkeys)
297 self.assertRaises(Exc, baddict1.fromkeys, [1])
305 self.assertRaises(Exc, dict.fromkeys, BadSeq())
311 self.assertRaises(Exc, baddict2.fromkeys, [1])
315 self.assertEqual(dict.fromkeys(d, 0), dict(zip(range(6), [0]*6)))
323 self.assertEqual(baddict3.fromkeys({"a", "b", "c"}), res)
945 d = dict.fromkeys([x, y, z])
950 d = dict.fromkeys([x, y, z, o])
1326 dict.fromkeys(d) # shouldn't crash
1344 dict.fromkeys(d) # shouldn't crash