2.2 features

Bengt Richter bokr at accessone.com
Tue Jul 31 15:44:24 EDT 2001


On Tue, 31 Jul 2001 13:05:06 -0400, Guido van Rossum <guido at zope.com> wrote:

>>     Guido> I love it.  'x in type' as a shorthand for isinstance(x, type).
>>     Guido> Checked into CVS!
>> 
>> How about 'x in type' as a shorthand for 'issubclass(x, type)' if x is a
>> type or class instead of an instance?
>
>No, that would be ambiguous.  A subclass is not an instance.  A class
>or type represents a set of instances, so 'in' is justified in a
>sense.
>
'x of type' for 'issubclass(x, type)' ?

Another .02 USD
new kw though.




More information about the Python-list mailing list