// Return module‘s __name__ value. If the module does not provide one, or if it is not a string, // SystemError is raised and NULL is returned. func (mod *Module) Name() (string, error) { ret := C.PyModule_GetName(mod.c()) if ret == nil { return "", exception() } return C.GoString(ret), nil }
// char* PyModule_GetName(PyObject *module) // Return module‘s __name__ value. If the module does not provide one, or if it is not a string, SystemError is raised and NULL is returned. func PyModule_GetName(self *PyObject) string { c_name := C.PyModule_GetName(topy(self)) // we do not own c_name... return C.GoString(c_name) }