| 904 | } |
| 905 | |
| 906 | inline object getattr(handle obj, handle name) { |
| 907 | PyObject *result = PyObject_GetAttr(obj.ptr(), name.ptr()); |
| 908 | if (!result) { |
| 909 | throw error_already_set(); |
| 910 | } |
| 911 | return reinterpret_steal<object>(result); |
| 912 | } |
| 913 | |
| 914 | inline object getattr(handle obj, const char *name) { |
| 915 | PyObject *result = PyObject_GetAttrString(obj.ptr(), name); |