MCPcopy Create free account
hub / github.com/Sally-SH/VSP-LLM / __Pyx_PyObject_GetItem

Function __Pyx_PyObject_GetItem

fairseq/fairseq/data/data_utils_fast.cpp:25728–25739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25726 return NULL;
25727}
25728static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
25729 PyTypeObject *tp = Py_TYPE(obj);
25730 PyMappingMethods *mm = tp->tp_as_mapping;
25731 PySequenceMethods *sm = tp->tp_as_sequence;
25732 if (likely(mm && mm->mp_subscript)) {
25733 return mm->mp_subscript(obj, key);
25734 }
25735 if (likely(sm && sm->sq_item)) {
25736 return __Pyx_PyObject_GetIndex(obj, key);
25737 }
25738 return __Pyx_PyObject_GetItem_Slow(obj, key);
25739}
25740#endif
25741
25742/* KeywordStringCheck */

Calls 2

__Pyx_PyObject_GetIndexFunction · 0.70

Tested by

no test coverage detected