Skip to content

Commit

Permalink
array module support: remove()
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-sans-paille committed Aug 23, 2024
1 parent 3f15838 commit 1251fd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pythran/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def update_effects(self, node):
"frombytes": MethodIntr(),
"insert": MethodIntr(),
"pop": MethodIntr(),
"remove": MethodIntr(),
},
"list": {
"append": MethodIntr(signature=Fun[[List[T0], T0], None]),
Expand Down
4 changes: 4 additions & 0 deletions pythran/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ def test_array_insert(self):
def test_array_pop(self):
self.run_test("def array_pop_(f): import array; x = array.array('I',[f,2,3]); x.pop(); return int(x.pop(0))",
3, array_pop_=[int])

def test_array_remove(self):
self.run_test("def array_remove_(f): import array; x = array.array('I',[f,2,3]); x.remove(2); return x.tolist()",
3, array_remove_=[int])

0 comments on commit 1251fd3

Please sign in to comment.