MCPcopy Create free account
hub / github.com/pybind/pybind11 / reload

Function reload

include/pybind11/pybind11.h:1675–1681  ·  view source on GitHub ↗

Reload the module or throws `error_already_set`.

Source from the content-addressed store, hash-verified

1673
1674 /// Reload the module or throws `error_already_set`.
1675 void reload() {
1676 PyObject *obj = PyImport_ReloadModule(ptr());
1677 if (!obj) {
1678 throw error_already_set();
1679 }
1680 *this = reinterpret_steal<module_>(obj);
1681 }
1682
1683 /** \rst
1684 Adds an object to the module using the given name. Throws if an object with the given name

Callers

nothing calls this directly

Calls 1

ptrFunction · 0.85

Tested by

no test coverage detected