[docs] [issue13387] suggest assertIs(type(obj), cls) for exact type checking

Éric Araujo report at bugs.python.org
Fri Nov 18 18:06:25 CET 2011

Éric Araujo <merwok at netwok.org> added the comment:

+ To check for a specific type (without including superclasses) use
+ :func:`assertIs(type(obj), cls) <assertIs>`.

Don’t you mean “without accepting subclasses”, not superclasses?


Python tracker <report at bugs.python.org>

More information about the docs mailing list