MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / JSObjectValuesProxy_repr

Method JSObjectValuesProxy_repr

src/JSObjectValuesProxy.cc:129–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129PyObject *JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_repr(JSObjectValuesProxy *self) {
130 PyObject *seq;
131 PyObject *result = NULL;
132
133 Py_ssize_t rc = Py_ReprEnter((PyObject *)self);
134 if (rc != 0) {
135 return rc > 0 ? PyUnicode_FromString("...") : NULL;
136 }
137
138 seq = PySequence_List((PyObject *)self);
139 if (seq == NULL) {
140 goto Done;
141 }
142
143 result = PyUnicode_FromFormat("%s(%R)", PyDictValues_Type.tp_name, seq);
144 Py_DECREF(seq);
145Done:
146 Py_ReprLeave((PyObject *)self);
147 return result;
148}
149
150PyObject *JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_mapping(PyObject *self, void *Py_UNUSED(ignored)) {
151 return PyDictProxy_New((PyObject *)((_PyDictViewObject *)self)->dv_dict);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected