[Python-ideas] Allow isinstance second argument to be a set of types

Michael Foord fuzzyman at gmail.com
Mon Jul 4 22:09:11 CEST 2011


On 4 July 2011 16:28, Antoine Pitrou <solipsis at pitrou.net> wrote:

> On Mon, 4 Jul 2011 15:35:55 +0100
> Michael Foord <fuzzyman at gmail.com> wrote:
> > On 4 July 2011 08:02, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> >
> > > Michael Foord wrote:
> > >
> > >  It would feel cleaner to me if I could make FunctionTypes a set and
> use
> > >> that as the second argument to isinstance. :-)
> > >>
> > >
> > > Or more generally, any iterable object?
> >
> > I don't care about any iterable. If a set would work then I'd be happy.
> :-)
>
> Sure, but making it work for tuples and sets, but not other iterables,
> would be a pretty lousy API.
>

I have no *objection* to it working for arbitrary iterables, I just don't
care about it.

So does this mean no-one has any objections to my suggested change? I'll
create an issue.

Michael


>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>



-- 

http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110704/4d45f6d5/attachment.html>


More information about the Python-ideas mailing list