MCPcopy
hub / github.com/pyodide/pyodide / python_setattr

Function python_setattr

src/core/pyproxy.ts:2126–2139  ·  view source on GitHub ↗
(jsobj: PyProxy, jskey: any, jsval: any)

Source from the content-addressed store, hash-verified

2124}
2125
2126function python_setattr(jsobj: PyProxy, jskey: any, jsval: any) {
2127 let ptrobj = _getPtr(jsobj);
2128 let err;
2129 try {
2130 Py_ENTER();
2131 err = __pyproxy_setattr(ptrobj, jskey, jsval);
2132 Py_EXIT();
2133 } catch (e) {
2134 API.fatal_error(e);
2135 }
2136 if (err === -1) {
2137 _pythonexc2js();
2138 }
2139}
2140
2141function python_delattr(jsobj: PyProxy, jskey: any) {
2142 let ptrobj = _getPtr(jsobj);

Callers 1

setFunction · 0.85

Calls 1

_getPtrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…