<br><div><span class="gmail_quote">On 7/21/06, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'd like to hear from others whether the default iter fallback ought<br>to stay or go.</blockquote><div><br>It should go (in py3k, obviously not in 2.6.) Maybe there should be a convenient way to spell 'iter me like a sequence', but it should definately be explicit, not implicit.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> > (I also think that the two-argument form<br>> > iter(function, sentinel) is not very successful or useful and might be
<br>> > dropped, but that's a separate issue.)<br>><br>> This functionality should be moved to itertools.<br>> That will clear-up the odd function signature for iter().<br>> As it stands now, the function/sentinel form suffers from invisibility.
<br><br>That doesn't matter much since there are very few uses for it.</blockquote><div><br>I disagree, I use it reasonably often. Much more often than I'd use, say, the 'with' statement or the ifelse operator, even more often than I use classmethods (which I like, and use wherever appropriate.) I agree that the spelling is somewhat unfortunate, much like the different uses of type(), but I do consider it less of a wart than type(). I'd be -0 on moving it to itertools in py3k.
<br></div><br></div>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!