(&self, vm: &VirtualMachine)
| 343 | } |
| 344 | |
| 345 | fn pop(&self, vm: &VirtualMachine) -> PyResult { |
| 346 | // TODO: should be pop_front, but that requires rearranging every index |
| 347 | if let Some((key, _)) = self.content.pop_back() { |
| 348 | Ok(key) |
| 349 | } else { |
| 350 | let err_msg = vm.ctx.new_str(ascii!("pop from an empty set")).into(); |
| 351 | Err(vm.new_key_error(err_msg)) |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | fn update( |
| 356 | &self, |
no test coverage detected