<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 8:18 AM, M.-A. Lemburg <span dir="ltr"><<a href="mailto:mal@egenix.com" target="_blank">mal@egenix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><span style="color:rgb(34,34,34)">I think you'd first have to describe some use cases, </span></div></div></blockquote><div> <snip></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* ranges of numbers with a fixed stepping (which can create problems<br>
  near the edges due to rounding issues)<br></blockquote><div><snip> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looping over such ranges doesn't sound like a useful operation,<br></blockquote><div><br></div><div>Good point -- it is very common to want such a range of number in a sequence -- but does it need to be an iterator? Though in keeping with python's move to iterators by default, why not?</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
except for the case where you have a fixed stepping (and those<br>
can easily be implemented by mapping an integer to a stepping<br>
in your interval).<br></blockquote><div><br></div><div>and range can be easily implemented with a while loop.</div><div><br></div><div>Such fixed stepping sequences are really common, so convenience functions make sense. But more to the point, as you mention above (and I mentioned in a previous email), there can be problems near the edges due to rounding issues, so it would be nice to provide a built-in that addresses those problems consistently and predictably, rather than having each user write their own naive implementation and get it wrong much of the time.</div><div><br></div><div>NOTE: for many of us those common use-cases also involve doing a bunch of computation of arrays of numbers, and thus involve numpy anyway.</div><div><br></div><div>-Chris</div><div><br></div><div> </div></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>