[Python-ideas] Allow isinstance second argument to be a set of types
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Jul 5 03:26:03 CEST 2011
Chris Rebert wrote:
> Why does it accept nested tuples in the first place for that matter?
Probably so that tuples could be used to emulate a "set
of types" before we had real sets.
Now that we do have real sets, it doesn't seem necessary
to continue with this and allow sets of sets, etc. So
+1 on leaving tuple as a special case for this and
treating all other iterables as flat.
--
Greg
More information about the Python-ideas
mailing list