<div dir="ltr">On Mon, Jul 15, 2013 at 8:21 PM, Sergey <span dir="ltr"><<a href="mailto:sergemp@mail.ru" target="_blank">sergemp@mail.ru</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Do you think that people often know *args notation or add infinite lists? ;)<br></blockquote><div><br></div><div>I think people now know *args notation, yes (and yes, I make typos notwithstanding being a professional writer).<br>
<br></div><div>As for infinite lists, I actually had in mind a fairly specific and ordinary example.  I can imagine that one has one iterator the yields files, which themselves iterate over lines within files.  Maybe not *infinite* quite, but one might have a lot of files (even a lot matching some spec) on a slow network drive, and each of those files might have a lot of lines.  One plausible thing to do is keep searching until we find "the right line" ... but we don't want to actually open millions of files if we don't need to.  E.g.:<br>
<br></div><div>  for line in chain.from_iterable(lines_in_many_files):<br></div><div>      got_it = check_the(line)<br></div><div>      if got_it:<br></div><div>          break<br></div><div> <br clear="all"></div></div><br>
-- <br>Keeping medicines from the bloodstreams of the sick; food <br>from the bellies of the hungry; books from the hands of the <br>uneducated; technology from the underdeveloped; and putting <br>advocates of freedom in prisons.  Intellectual property is<br>
to the 21st century what the slave trade was to the 16th.<br>
</div></div>