File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
com.oracle.graal.python.test/src/tests
com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/set Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -53,3 +53,10 @@ def test_set_or():
53
53
54
54
union = s1 | s4
55
55
assert union == {1 , 2 , 3 }
56
+
57
+
58
+ def test_set_remove ():
59
+ s = {1 , 2 , 3 }
60
+ assert s == {1 , 2 , 3 }
61
+ s .remove (3 )
62
+ assert s == {1 , 2 }
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ abstract static class RemoveNode extends PythonBinaryBuiltinNode {
103
103
Object remove (PBaseSet self , Object other ,
104
104
@ Cached ("create()" ) HashingStorageNodes .DelItemNode delItemNode ) {
105
105
106
- if (delItemNode .execute (self , self .getDictStorage (), other )) {
106
+ if (! delItemNode .execute (self , self .getDictStorage (), other )) {
107
107
throw raise (PythonErrorType .KeyError , "%s" , other );
108
108
}
109
109
return PNone .NONE ;
You can’t perform that action at this time.
0 commit comments