22 Jul
2016
22 Jul
'16
1:36 a.m.
On 22 July 2016 at 14:04, Guido van Rossum
If it really must be two words, how about SizedIterable? That suggests it's a subclass of Sized and Iterable, which it is. Container doesn't need separate mention, it's pretty obvious that any Iterable can implement __contains__, and more people know that Iterable is an ABC than Container.
SizedIterable works for me, as it's the __len__ that drives most of the other interesting properties beyond an arbitrary iterable (like using iteration for the default containment check without worrying about consuming a one-shot iterator or creating an infinite loop). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia