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

Method JSObjectKeysProxy_repr

src/JSObjectKeysProxy.cc:201–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201PyObject *JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_repr(JSObjectKeysProxy *self) {
202 PyObject *seq;
203 PyObject *result = NULL;
204
205 Py_ssize_t rc = Py_ReprEnter((PyObject *)self);
206 if (rc != 0) {
207 return rc > 0 ? PyUnicode_FromString("...") : NULL;
208 }
209
210 seq = PySequence_List((PyObject *)self);
211 if (seq == NULL) {
212 goto Done;
213 }
214
215 result = PyUnicode_FromFormat("%s(%R)", PyDictKeys_Type.tp_name, seq);
216 Py_DECREF(seq);
217
218Done:
219 Py_ReprLeave((PyObject *)self);
220 return result;
221}
222
223// private
224static Py_ssize_t dictview_len(_PyDictViewObject *dv) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected