On Sun, Jul 15, 2012 at 1:36 PM, Antoine Pitrou <solipsis at pitrou.net> wrote: > On Sun, 15 Jul 2012 18:47:38 +1000 > Nick Coghlan <ncoghlan at gmail.com> wrote: >> I'm not seeing the value in returning None over 0 for the don't know >> case - it just makes the API harder to use. > > The point is that 0 is a legitimate value for a length hint. Simple > implementations of __length_hint__ will start returning 0 as a > legitimate value and you will wrongly interpret that as "don't know", > which kinds of defeat the purpose of __length-hint__ ;) I agree with this: giving special meaning to what's already a valid length value seems wrong. Mark
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4