<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 30, 2015 at 2:46 PM, Neil Girdhar <span dir="ltr"><<a href="mailto:mistersheik@gmail.com" target="_blank">mistersheik@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">It doesn't behave like a generator because it doesn't implement send, throw, or close.</blockquote><div><br></div><div>It is not a generator because Python says it is not:</div><div><br></div><div><div>>>> isinstance(range(0), collections.Generator)</div><div>False</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">   It's a sequence because it implements:  __getitem__, __len__ __contains__, __iter__, __reversed__, index, and count.</blockquote></div><br>Ditto</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">>>> isinstance(range(0), collections.Sequence)</div><div class="gmail_extra">True</div></div></div>