<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Jan 9, 2015, at 23:03, Andrew Barnert <<a href="mailto:abarnert@yahoo.com.dmarc.invalid">abarnert@yahoo.com.dmarc.invalid</a>> wrote:</div><div><br></div><blockquote type="cite"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>On Jan 9, 2015, at 21:13, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:</div><div><br></div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 9, 2015 at 7:29 PM, Andrew Barnert <span dir="ltr"><<a href="mailto:abarnert@yahoo.com.dmarc.invalid" target="_blank">abarnert@yahoo.com.dmarc.invalid</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Jan 9, 2015, at 14:36, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br></span></blockquote></div></div></div></blockquote></blockquote><br><blockquote type="cite"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra">- make it a lazy sequence, with slicing ability, etc.<br></div></div></blockquote><div><br></div><div>If you don't need O(1) __contains__ and friends (and I don't think you do) that's maybe 5 lines of code with the ABC.</div></blockquote><div><br></div><div>Actually, one problem here: computing the linspace corresponding to a slice of another linspace is not guaranteed to give you the same values. For example, using the second algorithm, lisf(linspace(0, 1, 11)[::3]) != list(linspace(0, .9, 4)). Using the first algorithm, list(linspace(-2, 2, 20))[1::2] != list(linspace(-1.7894736842105263, 2, 10).</div><div><br></div><div>So, does this mean a slice of a linspace should be a list? A linspace whose values may not compare equal? A special linspace-slice-view object?</div><div><br></div></body></html>