This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author flox
Recipients flox, georg.brandl, michael.foord
Date 2011-11-12.12:43:21
SpamBayes Score 0.002874038
Marked as misclassified No
Message-id <1321101802.89.0.94542095022.issue13387@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2011-11-12 12:43:22floxsetrecipients: + flox, georg.brandl, michael.foord
2011-11-12 12:43:22floxsetmessageid: <1321101802.89.0.94542095022.issue13387@psf.upfronthosting.co.za>
2011-11-12 12:43:22floxlinkissue13387 messages
2011-11-12 12:43:22floxcreate