Skip to content

Commit c8e1901

Browse files
committed
Update dict_ops.py
1 parent 66f57e6 commit c8e1901

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

mypyc/primitives/dict_ops.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
return_type=object_rprimitive,
102102
c_function_name="CPyDict_GetItemUnsafe",
103103
error_kind=ERR_MAGIC,
104+
priority=2,
104105
)
105106

106107
# dictsubclass[key]
@@ -141,6 +142,7 @@
141142
error_kind=ERR_NEG_INT,
142143
truncated_type=bool_rprimitive,
143144
ordering=[1, 0],
145+
priority=2,
144146
)
145147

146148
# key in dict or dict subclass
@@ -231,15 +233,6 @@
231233
)
232234

233235
# dict.get(key, default)
234-
method_op(
235-
name="get",
236-
arg_types=[exact_dict_rprimitive, object_rprimitive, object_rprimitive],
237-
return_type=object_rprimitive,
238-
c_function_name="CPyDict_Get",
239-
error_kind=ERR_MAGIC,
240-
)
241-
242-
# dictorsubclass.get(key, default)
243236
method_op(
244237
name="get",
245238
arg_types=[dict_rprimitive, object_rprimitive, object_rprimitive],
@@ -273,6 +266,7 @@
273266
return_type=object_rprimitive,
274267
c_function_name="PyDict_SetDefault",
275268
error_kind=ERR_NEVER,
269+
priority=2,
276270
)
277271

278272
# dictorsubclass.setdefault(key, default)
@@ -285,15 +279,6 @@
285279
)
286280

287281
# dict.setdefault(key)
288-
method_op(
289-
name="setdefault",
290-
arg_types=[exact_dict_rprimitive, object_rprimitive],
291-
return_type=object_rprimitive,
292-
c_function_name="CPyDict_SetDefaultWithNone",
293-
error_kind=ERR_MAGIC,
294-
)
295-
296-
# dictorsubclass.setdefault(key)
297282
method_op(
298283
name="setdefault",
299284
arg_types=[dict_rprimitive, object_rprimitive],
@@ -320,6 +305,7 @@
320305
return_type=object_rprimitive,
321306
c_function_name="CPyDict_KeysViewUnsafe",
322307
error_kind=ERR_MAGIC,
308+
priority=2,
323309
)
324310

325311
# dictorsubclass.keys()
@@ -338,6 +324,7 @@
338324
return_type=object_rprimitive,
339325
c_function_name="CPyDict_ValuesViewUnsafe",
340326
error_kind=ERR_MAGIC,
327+
priority=2,
341328
)
342329

343330
# dictorsubclass.values()
@@ -356,6 +343,7 @@
356343
return_type=object_rprimitive,
357344
c_function_name="CPyDict_ItemsViewUnsafe",
358345
error_kind=ERR_MAGIC,
346+
priority=2,
359347
)
360348

361349
# dictorsubclass.items()
@@ -374,6 +362,7 @@
374362
return_type=void_rtype,
375363
c_function_name="PyDict_Clear",
376364
error_kind=ERR_NEVER,
365+
priority=2,
377366
)
378367

379368
# dictsubclass.clear()

0 commit comments

Comments
 (0)