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