Home
last modified time | relevance | path

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

1234567891011

/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/python/asn1crypto/tests/
Dtest_x509.py501 …self.assertEqual(alt_names[4].chosen.native, util.OrderedDict([('type_id', '1.2.3.4'), ('value', '…
503 … self.assertEqual(alt_names[5].chosen.native, util.OrderedDict([('common_name', '127.0.0.3')]))
700 util.OrderedDict([('type', 'pda_country_of_citizenship'), ('values', ['DE'])]),
701 util.OrderedDict([('type', 'pda_gender'), ('values', ['F'])]),
702 util.OrderedDict([('type', 'pda_date_of_birth'), ('values', [
704 util.OrderedDict([('type', 'pda_place_of_birth'), ('values', ['Darmstadt'])]),
891 util.OrderedDict([
1064 util.OrderedDict([
1068 util.OrderedDict([
1073 util.OrderedDict([
[all …]
Dtest_cms.py261 util.OrderedDict([
264 util.OrderedDict([
359 util.OrderedDict([
397 util.OrderedDict([
400 util.OrderedDict([
418 util.OrderedDict([
458 util.OrderedDict([
497 util.OrderedDict([
535 util.OrderedDict([
538 util.OrderedDict([
[all …]
Dtest_csr.py39 util.OrderedDict([
51 util.OrderedDict([
82 util.OrderedDict([
94 util.OrderedDict([
110 util.OrderedDict([
116 util.OrderedDict([
121 util.OrderedDict([
127 util.OrderedDict([
Dtest_tsp.py142 util.OrderedDict([
170 util.OrderedDict([
173 util.OrderedDict([
226 util.OrderedDict([
230 util.OrderedDict([
/external/tensorflow/tensorflow/python/framework/
Dtest_combinations_test.py21 from collections import OrderedDict
48 OrderedDict([("aa", 1), ("ab", 2)]),
49 OrderedDict([("aa", 1), ("ab", 3)]),
50 OrderedDict([("aa", 2), ("ab", 2)]),
51 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 …]
Dtest_combinations.py50 from collections import OrderedDict
261 assert isinstance(combination, OrderedDict)
268 OrderedDict(
388 return [OrderedDict()]
391 kwargs = OrderedDict(sorted(kwargs.items(), key=sort_by_key))
403 OrderedDict(sorted(list(combined.items()) + [(key, v)], key=sort_by_key))
439 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))
/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))
/external/python/cpython3/Parser/pgen/
Dgrammar.py46 self.symbol2number = collections.OrderedDict()
47 self.number2symbol = collections.OrderedDict()
49 self.dfas = collections.OrderedDict()
51 self.keywords = collections.OrderedDict()
52 self.tokens = collections.OrderedDict()
53 self.symbol2label = collections.OrderedDict()
/external/rust/crates/grpcio-sys/grpc/tools/interop_matrix/
Dclient_matrix.py18 from collections import OrderedDict
79 OrderedDict([
115 OrderedDict([
185 OrderedDict([
253 OrderedDict([
313 OrderedDict([
329 OrderedDict([
376 OrderedDict([
412 OrderedDict([
/external/tensorflow/tensorflow/python/keras/engine/
Dtraining_integration_test.py61 (keras.layers.Dense, (1,), (False,), collections.OrderedDict([
63 (keras.layers.Activation, (2, 2), (True, True), collections.OrderedDict([
65 (keras.layers.Dropout, (16,), (False,), collections.OrderedDict([
68 collections.OrderedDict([
73 (keras.layers.Conv1D, (8, 8), (False, False), collections.OrderedDict([
83 collections.OrderedDict([
93 (keras.layers.LSTM, (4, 4), (False, False), collections.OrderedDict([
/external/llvm-project/clang/test/AST/
Dgen_ast_dump_json_test.py4 from collections import OrderedDict
18 if isinstance(v, OrderedDict):
22 if isinstance(e, OrderedDict):
52 elif isinstance(v, OrderedDict):
56 if isinstance(e, OrderedDict):
167 j = json.loads(split.decode('utf-8'), object_pairs_hook=OrderedDict)
171 j = json.loads(json_str.decode('utf-8'), object_pairs_hook=OrderedDict)
/external/python/cpython3/Mac/Tools/
Dplistlib_generate_testdata.py11 from collections import OrderedDict
25 pl = OrderedDict()
37 pl[nsstr('aDict')] = d = OrderedDict()
42 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/tpu/
Dtpu_embedding_gradient.py48 feature_to_gradient_dict = collections.OrderedDict(
71 dummy_table_variables = collections.OrderedDict()
118 new_activations = collections.OrderedDict()
143 feature_to_gradient_dict = collections.OrderedDict()
/external/vulkan-validation-layers/scripts/
Dcommon_codegen.py23 from collections import namedtuple, OrderedDict
77 class HandleDict(OrderedDict):
92 type_categories = OrderedDict()
/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/python/dateutil/dateutil/tz/
D_factories.py3 from collections import OrderedDict
26 cls.__strong_cache = OrderedDict()
53 cls.__strong_cache = OrderedDict()
/external/mesa3d/src/intel/genxml/
Dgen_sort_tags.py5 from collections import OrderedDict
55 self.deps = OrderedDict()
58 deps = OrderedDict()
131 sorted_structs = OrderedDict()
/external/tensorflow/tensorflow/python/util/
Dnest_test.py165 @parameterized.parameters({"mapping_type": collections.OrderedDict},
177 @parameterized.parameters({"mapping_type": collections.OrderedDict},
196 ordered = collections.OrderedDict([("d", 3), ("b", 1), ("a", 0), ("c", 2)])
223 collections.OrderedDict([
244 collections.OrderedDict([
259 self.assertIsInstance(unflattened_ordered_dict, collections.OrderedDict)
602 inp_ab = collections.OrderedDict([("a", 1), ("b", (2, 3))])
603 inp_ba = collections.OrderedDict([("b", (2, 3)), ("a", 1)])
657 input_tree = collections.OrderedDict(
659 ("c", {"d": 3, "e": collections.OrderedDict([("f", 4)])})])
[all …]

1234567891011