<br><br><div class="gmail_quote">On Mon, Jul 4, 2011 at 10:51 AM, Gregory P. Smith <span dir="ltr"><<a href="mailto:greg@krypto.org">greg@krypto.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br><br><div class="gmail_quote"><div class="im">On Mon, Jul 4, 2011 at 8:28 AM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


On Mon, 4 Jul 2011 15:35:55 +0100<br>
<div>Michael Foord <<a href="mailto:fuzzyman@gmail.com" target="_blank">fuzzyman@gmail.com</a>> wrote:<br>
</div><div>> On 4 July 2011 08:02, Greg Ewing <<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</a>> wrote:<br>
><br>
> > Michael Foord wrote:<br>
> ><br>
> >  It would feel cleaner to me if I could make FunctionTypes a set and use<br>
> >> that as the second argument to isinstance. :-)<br>
> >><br>
> ><br>
> > Or more generally, any iterable object?<br>
><br>
> I don't care about any iterable. If a set would work then I'd be happy. :-)<br>
<br>
</div>Sure, but making it work for tuples and sets, but not other iterables,<br>
would be a pretty lousy API.<br></blockquote><div><br></div></div><div>A set lookup should be faster than iteration for anything over ~3 types.  I support the change even if it doesn't include all iterables.  The use case for arbitrary iterables of types to isinstance seems low.</div>

</div></blockquote><div><br></div><div>note that a fast lookup implies exact type and not subclass making my point silly... at which point you're back to iterating so I suspect supporting arbitrary iterables is actually how this will be implemented regardless.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards<br>
<font color="#888888"><br>
Antoine.<br>
</font><div><div></div><div><br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</div></div></blockquote></div></div><br>
</blockquote></div><br>