* Returns `str(o)` (unless `pyproxyToStringRepr: true` was passed to * :js:func:`~exports.loadPyodide` in which case it will return `repr(o)`)
()
| 720 | * :js:func:`~exports.loadPyodide` in which case it will return `repr(o)`) |
| 721 | */ |
| 722 | toString(): string { |
| 723 | let ptrobj = _getPtr(this); |
| 724 | let result; |
| 725 | try { |
| 726 | Py_ENTER(); |
| 727 | result = __pyproxy_repr(ptrobj); |
| 728 | Py_EXIT(); |
| 729 | } catch (e) { |
| 730 | API.fatal_error(e); |
| 731 | } |
| 732 | if (result === Module.error) { |
| 733 | _pythonexc2js(); |
| 734 | } |
| 735 | return result; |
| 736 | } |
| 737 | /** |
| 738 | * Destroy the :js:class:`~pyodide.ffi.PyProxy`. This will release the memory. Any further attempt |
| 739 | * to use the object will raise an error. |
no test coverage detected