MCPcopy
hub / github.com/pyodide/pyodide / delete

Method delete

src/core/pyproxy.ts:1045–1058  ·  view source on GitHub ↗

* This translates to the Python code ``del obj[key]``. * * @param key The key to delete.

(key: any)

Source from the content-addressed store, hash-verified

1043 * @param key The key to delete.
1044 */
1045 delete(key: any) {
1046 let ptrobj = _getPtr(this);
1047 let err;
1048 try {
1049 Py_ENTER();
1050 err = __pyproxy_delitem(ptrobj, key);
1051 Py_EXIT();
1052 } catch (e) {
1053 API.fatal_error(e);
1054 }
1055 if (err === -1) {
1056 _pythonexc2js();
1057 }
1058 }
1059}
1060
1061/**

Callers 6

_rm_s3_prefixFunction · 0.80
initializeNativeFSFunction · 0.80
loadPackageInnerMethod · 0.80
literal-map.jsFile · 0.80
pyproxy.tsFile · 0.80
runFunction · 0.80

Calls 1

_getPtrFunction · 0.85

Tested by 1

runFunction · 0.64