| 302 | } |
| 303 | |
| 304 | fn py_join( |
| 305 | &self, |
| 306 | mut iter: impl core::iter::Iterator<Item = PyResult<impl AnyStrWrapper<Self> + TryFromObject>>, |
| 307 | ) -> PyResult<Self::Container> { |
| 308 | let mut joined = if let Some(elem) = iter.next() { |
| 309 | elem?.as_ref().unwrap().to_container() |
| 310 | } else { |
| 311 | return Ok(Self::Container::new()); |
| 312 | }; |
| 313 | for elem in iter { |
| 314 | let elem = elem?; |
| 315 | joined.push_str(self); |
| 316 | joined.push_str(elem.as_ref().unwrap()); |
| 317 | } |
| 318 | Ok(joined) |
| 319 | } |
| 320 | |
| 321 | fn py_partition<'a, F, S>( |
| 322 | &'a self, |