23 def __contains__(&self, key: PyObject) -> PyResult<bool> { |
23 def __contains__(&self, key: PyObject) -> PyResult<bool> { |
24 self.dmap(py).non_normal_entries_contains(py, key) |
24 self.dmap(py).non_normal_entries_contains(py, key) |
25 } |
25 } |
26 def remove(&self, key: PyObject) -> PyResult<PyObject> { |
26 def remove(&self, key: PyObject) -> PyResult<PyObject> { |
27 self.dmap(py).non_normal_entries_remove(py, key) |
27 self.dmap(py).non_normal_entries_remove(py, key) |
|
28 } |
|
29 def add(&self, key: PyObject) -> PyResult<PyObject> { |
|
30 self.dmap(py).non_normal_entries_add(py, key) |
|
31 } |
|
32 def discard(&self, key: PyObject) -> PyResult<PyObject> { |
|
33 self.dmap(py).non_normal_entries_discard(py, key) |
28 } |
34 } |
29 def __richcmp__(&self, other: PyObject, op: CompareOp) -> PyResult<bool> { |
35 def __richcmp__(&self, other: PyObject, op: CompareOp) -> PyResult<bool> { |
30 match op { |
36 match op { |
31 CompareOp::Eq => self.is_equal_to(py, other), |
37 CompareOp::Eq => self.is_equal_to(py, other), |
32 CompareOp::Ne => Ok(!self.is_equal_to(py, other)?), |
38 CompareOp::Ne => Ok(!self.is_equal_to(py, other)?), |