| 1171 | |
| 1172 | template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0> |
| 1173 | static object get(handle obj, const IdxType &index) { |
| 1174 | PyObject *result = PySequence_GetItem(obj.ptr(), ssize_t_cast(index)); |
| 1175 | if (!result) { |
| 1176 | throw error_already_set(); |
| 1177 | } |
| 1178 | return reinterpret_steal<object>(result); |
| 1179 | } |
| 1180 | |
| 1181 | template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0> |
| 1182 | static void set(handle obj, const IdxType &index, handle val) { |
nothing calls this directly
no test coverage detected