Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1ecdf3 commit b0b3919Copy full SHA for b0b3919
Lib/test/test_funcattrs.py
@@ -140,8 +140,6 @@ def f(): print(a)
140
self.fail("shouldn't be able to read an empty cell")
141
a = 12
142
143
- # TODO: RUSTPYTHON
144
- @unittest.expectedFailure
145
def test_set_cell(self):
146
147
def f(): return a
vm/src/builtins/function.rs
@@ -759,8 +759,11 @@ impl PyCell {
759
.ok_or_else(|| vm.new_value_error("Cell is empty".to_owned()))
760
}
761
#[pygetset(setter)]
762
- fn set_cell_contents(&self, x: PyObjectRef) {
763
- self.set(Some(x))
+ fn set_cell_contents(&self, x: PySetterValue) {
+ match x {
764
+ PySetterValue::Assign(value) => self.set(Some(value)),
765
+ PySetterValue::Delete => self.set(None),
766
+ }
767
768
769
0 commit comments