2.2 features

Kirill Simonov kirill at xyz.donetsk.ua
Tue Jul 31 12:06:54 EDT 2001


On Tue, Jul 31, 2001 at 09:21:40AM -0500, Skip Montanaro 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?

It is better to change type comparison, e.g.
    (A >= B) == issubclass(A, B)






More information about the Python-list mailing list