mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-09 21:20:17 +00:00
WIP: minor fix
This commit is contained in:
parent
ff5e1a8de2
commit
d17e1368da
@ -176,7 +176,6 @@ namespace pkpy
|
||||
return vm->None;
|
||||
});
|
||||
|
||||
|
||||
vm->bind(type, "rotate(self, n=1) -> None",
|
||||
[](VM *vm, ArgsView args)
|
||||
{
|
||||
@ -234,9 +233,9 @@ namespace pkpy
|
||||
bool PyDeque::insert(int index, PyObject *item)
|
||||
{
|
||||
if (index < 0)
|
||||
this->dequeItems.appendLeft(item);
|
||||
this->dequeItems.push_front(item);
|
||||
else if (index >= this->dequeItems.size())
|
||||
this->dequeItems.append(item);
|
||||
this->dequeItems.push_back(item);
|
||||
else
|
||||
this->dequeItems.insert((this->dequeItems.begin() + index), item);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user