New submission from Al Korgun: It would be pretty good, if 'assert' could raise specified exception, like that:
>>> data = None >>> assert isinstance(data, basestring), TypeError("'data' must be a string") <s>AssertionError</s>TypeError: 'data' must be a string ---------- components: Interpreter Core messages: 194250 nosy: WitcherGeralt priority: normal severity: normal status: open title: enhancement for operator 'assert' type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18642> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com