add deque __bool__ method
Adds deque.bool
@@ -472,6 +472,11 @@ mod _collections {
self.borrow_deque().len()
}
+ #[pymethod(magic)]
+ fn bool(&self) -> bool {
+ !self.borrow_deque().is_empty()
+ }
+
#[pymethod(magic)]
fn iadd(
zelf: PyRef<Self>,
