| 64 | } |
| 65 | |
| 66 | void list_base::insert(ssize_t index, object_cref item) |
| 67 | { |
| 68 | if (PyList_CheckExact(this->ptr())) |
| 69 | { |
| 70 | if (PyList_Insert(this->ptr(), index, item.ptr()) == -1) |
| 71 | throw_error_already_set(); |
| 72 | } |
| 73 | else |
| 74 | { |
| 75 | this->attr("insert")(index, item); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void list_base::insert(object const& index, object_cref x) |
| 80 | { |