[Python-ideas] Allow isinstance second argument to be a set of types
Raymond Hettinger
raymond.hettinger at gmail.com
Tue Jul 5 03:55:28 CEST 2011
On Jul 4, 2011, at 6:26 PM, Greg Ewing wrote:
> 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.
-1 on further garbaging this API by introducing yet another signature variant -- even worse, a signature variant with a special case for the tuple type (didn't we learn our lesson with old-style string formatting).
I have to agree with Benjamin that this proposal would be utterly unnecessary software bloat.
Raymond
More information about the Python-ideas
mailing list