Mark Dickinson added the comment: Ah, so I think I don't understand the proposal. In your original message, is it your intention that the assert raises TypeError, or that it raises AssertionError?
Again: what's the benefit over existing solutions? Either: if not isinstance(data, basestring): raise TypeError("Bad user! You gave me the wrong type") or assert isinstance(data, basestring), "data should be a string at this point" ? ---------- _______________________________________ 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