Home
last modified time | relevance | path

Searched refs:OrderedDict (Results 1 – 25 of 201) sorted by relevance

123456789

/external/python/cpython3/Lib/test/
Dtest_ordered_dict.py32 OrderedDict = self.OrderedDict
34 OrderedDict([('a', 1), ('b', 2)], None) # too many args
36 self.assertEqual(sorted(OrderedDict(dict(pairs)).items()), pairs) # dict input
37 self.assertEqual(sorted(OrderedDict(**dict(pairs)).items()), pairs) # kwds input
38 self.assertEqual(list(OrderedDict(pairs).items()), pairs) # pairs input
39 self.assertEqual(list(OrderedDict([('a', 1), ('b', 2), ('c', 9), ('d', 4)],
43 self.assertEqual(list(OrderedDict(self=42).items()), [('self', 42)])
44 self.assertEqual(list(OrderedDict(other=42).items()), [('other', 42)])
45 self.assertRaises(TypeError, OrderedDict, 42)
46 self.assertRaises(TypeError, OrderedDict, (), ())
[all …]
/external/python/cpython2/Lib/test/
Dtest_ordered_dict.py5 from collections import OrderedDict
14 OrderedDict([('a', 1), ('b', 2)], None) # too many args
16 self.assertEqual(sorted(OrderedDict(dict(pairs)).items()), pairs) # dict input
17 self.assertEqual(sorted(OrderedDict(**dict(pairs)).items()), pairs) # kwds input
18 self.assertEqual(list(OrderedDict(pairs).items()), pairs) # pairs input
19 self.assertEqual(list(OrderedDict([('a', 1), ('b', 2), ('c', 9), ('d', 4)],
23 self.assertEqual(list(OrderedDict(self=42).items()), [('self', 42)])
24 self.assertEqual(list(OrderedDict(other=42).items()), [('other', 42)])
25 self.assertRaises(TypeError, OrderedDict, 42)
26 self.assertRaises(TypeError, OrderedDict, (), ())
[all …]
/external/tensorflow/tensorflow/contrib/distribute/python/
Dcombinations_test.py21 from collections import OrderedDict
47 OrderedDict([("aa", 1), ("ab", 2)]),
48 OrderedDict([("aa", 1), ("ab", 3)]),
49 OrderedDict([("aa", 2), ("ab", 2)]),
50 OrderedDict([("aa", 2), ("ab", 3)])
82 OrderedDict([("distribution", "d1"), ("loss", "callable"),
84 OrderedDict([("distribution", "d1"), ("loss", "tensor"),
86 OrderedDict([("distribution", "d1"), ("loss", "callable"),
88 OrderedDict([("distribution", "d2"), ("loss", "callable"),
90 OrderedDict([("distribution", "d2"), ("loss", "tensor"),
[all …]
Dcombinations.py42 from collections import OrderedDict
115 assert isinstance(combination, OrderedDict)
123 OrderedDict(
233 return [OrderedDict()]
236 kwargs = OrderedDict(sorted(kwargs.items(), key=sort_by_key))
248 OrderedDict(sorted(list(combined.items()) + [(key, v)], key=sort_by_key))
283 combined_results.append(OrderedDict(list(a.items()) + list(b.items())))
/external/python/cpython2/Lib/json/tests/
Dtest_decode.py3 from collections import OrderedDict
39 od = self.loads(s, object_pairs_hook=OrderedDict)
40 self.assertEqual(od, OrderedDict(p))
41 self.assertEqual(type(od), OrderedDict)
43 self.assertEqual(self.loads(s, object_pairs_hook=OrderedDict,
45 OrderedDict(p))
47 self.assertEqual(self.loads('{}', object_pairs_hook=OrderedDict),
48 OrderedDict())
50 object_pairs_hook=OrderedDict),
51 OrderedDict([('empty', OrderedDict())]))
Dtest_unicode.py1 from collections import OrderedDict
63 od = self.loads(s, object_pairs_hook = OrderedDict)
64 self.assertEqual(od, OrderedDict(p))
65 self.assertEqual(type(od), OrderedDict)
68 object_pairs_hook = OrderedDict,
70 OrderedDict(p))
Dtest_encode_basestring_ascii.py1 from collections import OrderedDict
36 s = self.dumps(OrderedDict(items))
/external/markdown/markdown/
Dodict.py1 class OrderedDict(dict): class
9 instance = super(OrderedDict, cls).__new__(cls, *args, **kwargs)
16 super(OrderedDict, self).__init__(data)
31 super(OrderedDict, self).__setitem__(key, value)
36 super(OrderedDict, self).__delitem__(key)
44 result = super(OrderedDict, self).pop(k, *args)
53 result = super(OrderedDict, self).popitem()
62 yield key, super(OrderedDict, self).__getitem__(key)
71 return [super(OrderedDict, self).__getitem__(k) for k in self.keyOrder]
75 yield super(OrderedDict, self).__getitem__(key)
[all …]
/external/python/cpython3/Lib/test/test_json/
Dtest_decode.py3 from collections import OrderedDict
31 od = self.loads(s, object_pairs_hook=OrderedDict)
32 self.assertEqual(od, OrderedDict(p))
33 self.assertEqual(type(od), OrderedDict)
35 self.assertEqual(self.loads(s, object_pairs_hook=OrderedDict,
37 OrderedDict(p))
39 self.assertEqual(self.loads('{}', object_pairs_hook=OrderedDict),
40 OrderedDict())
42 object_pairs_hook=OrderedDict),
43 OrderedDict([('empty', OrderedDict())]))
Dtest_unicode.py2 from collections import OrderedDict
88 od = self.loads(s, object_pairs_hook = OrderedDict)
89 self.assertEqual(od, OrderedDict(p))
90 self.assertEqual(type(od), OrderedDict)
92 self.assertEqual(self.loads(s, object_pairs_hook = OrderedDict,
94 OrderedDict(p))
Dtest_encode_basestring_ascii.py1 from collections import OrderedDict
32 s = self.dumps(OrderedDict(items))
/external/tensorflow/tensorflow/python/tpu/
Dtpu_embedding_gradient.py46 feature_to_gradient_dict = collections.OrderedDict(
69 dummy_table_variables = collections.OrderedDict()
116 new_activations = collections.OrderedDict()
141 feature_to_gradient_dict = collections.OrderedDict()
/external/python/cpython3/Mac/Tools/
Dplistlib_generate_testdata.py10 from collections import OrderedDict
24 pl = OrderedDict()
36 pl[nsstr('aDict')] = d = OrderedDict()
41 d[nsstr('deeperDict')] = dd = OrderedDict()
/external/protobuf/python/google/protobuf/internal/
Dproto_builder_test.py36 from collections import OrderedDict
38 from ordereddict import OrderedDict #PY26
53 self.ordered_fields = OrderedDict([
/external/tensorflow/tensorflow/python/util/
Dnest_test.py125 @parameterized.parameters({"mapping_type": collections.OrderedDict},
137 @parameterized.parameters({"mapping_type": collections.OrderedDict},
166 collections.OrderedDict([
187 collections.OrderedDict([
202 self.assertIsInstance(unflattened_ordered_dict, collections.OrderedDict)
537 inp_ab = collections.OrderedDict([("a", 1), ("b", (2, 3))])
538 inp_ba = collections.OrderedDict([("b", (2, 3)), ("a", 1)])
585 input_tree = collections.OrderedDict(
587 ("c", {"d": 3, "e": collections.OrderedDict([("f", 4)])})])
592 shallow_tree = collections.OrderedDict([("a", 0), ("c", {"d": 3, "e": 1})])
[all …]
/external/protobuf/python/google/protobuf/
Dproto_builder.py34 from collections import OrderedDict
36 from ordereddict import OrderedDict #PY26
88 if not isinstance(fields, OrderedDict):
/external/u-boot/tools/binman/
Dcontrol.py8 from collections import OrderedDict
22 images = OrderedDict()
35 images = OrderedDict()
/external/tensorflow/tensorflow/python/data/util/
Dnest_test.py71 ordered = collections.OrderedDict([("d", 3), ("b", 1), ("a", 0), ("c", 2)])
80 ordered = collections.OrderedDict([("d", 0), ("b", 0), ("a", 0), ("c", 0)])
86 collections.OrderedDict([("d", 3), ("b", 1), ("a", 0), ("c", 2)]),
99 collections.OrderedDict([
118 collections.OrderedDict([
133 self.assertIsInstance(unflattened_ordered_dict, collections.OrderedDict)
301 inp_ab = collections.OrderedDict([("a", 1), ("b", (2, 3))])
302 inp_ba = collections.OrderedDict([("b", (2, 3)), ("a", 1)])
/external/deqp/modules/gles3/scripts/
Dgen-swizzle-math-operations.py25 from collections import OrderedDict
136 INPUTS = OrderedDict([
147 OPERATORS = OrderedDict([
/external/fonttools/Tests/misc/
Detree_test.py4 from collections import OrderedDict
42 attrs = OrderedDict([("c", "2"), ("b", "1"), ("a", "0")])
/external/python/cpython2/Doc/library/
Dcollections.rst29 :class:`OrderedDict` dict subclass that remembers the order entries were added .. ve…
631 'Return a new OrderedDict which maps field names to their values'
632 return OrderedDict(zip(self._fields, self))
648 'Exclude the OrderedDict from pickling'
700 Return a new :class:`OrderedDict` which maps field names to their corresponding
705 OrderedDict([('x', 11), ('y', 22)])
708 Returns an :class:`OrderedDict` instead of a regular :class:`dict`.
797 :class:`OrderedDict` objects
804 .. class:: OrderedDict([items])
807 methods. An *OrderedDict* is a dict that remembers the order that keys
[all …]
/external/python/funcsigs/funcsigs/
D__init__.py14 from collections import OrderedDict
16 from funcsigs.odict import OrderedDict
99 new_params = OrderedDict(sig.parameters.items())
481 params = OrderedDict()
484 params = OrderedDict()
506 params = OrderedDict(((param.name, param)
590 return OrderedDict(self._parameters.items())
651 arguments = OrderedDict()
/external/tensorflow/tensorflow/contrib/boosted_trees/python/ops/
Dbatch_ops_utils.py87 grouped_args = collections.OrderedDict()
97 grouped_args = collections.OrderedDict(
106 batched_ops = collections.OrderedDict()
/external/harfbuzz_ng/src/
Dgen-emoji-table.py6 from collections import OrderedDict
15 ranges = OrderedDict()
/external/markdown/docs/
Dwriting_extensions.txt30 * [OrderedDict][]
363 the Markdown class in [OrderedDict][]s. Your ``Extension`` class will need to
365 processors and patterns into the appropriate location in an OrderedDict, remove
376 access the [OrderedDict][]s of processors and patterns. They are found
412 <h4 id="ordereddict">OrderedDict</h4>
414 An OrderedDict is a dictionary like object that retains the order of it's
416 the OrderedDict. However, an item can also be inserted into the OrderedDict
419 Think of OrderedDict as a combination of a list and a dictionary as it has
427 helper method ``add()`` to add additional items to an existing OrderedDict.
440 beginning or end of the OrderedDict respectively.
[all …]

123456789