New submission from Florent Xicluna <florent.xicl...@gmail.com>: Sometimes we want to check the exact type of an object. The method assertIsInstance could be misleading in such case.
The current workaround is: assertIs(type(obj), some_class) However we can add an argument to the method to keep the benefit of having a nice failure message. Examples: assertIsInstance(stdobj, dict, exact_type=True) assertIsInstance(myobj, dict, exact_type=MyDict) ---------- components: Tests messages: 147480 nosy: flox, georg.brandl, michael.foord priority: normal severity: normal status: open title: add exact_type argument to assertIsInstance type: feature request versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13387> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com