Message194259
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"
? |
|
Date |
User |
Action |
Args |
2013-08-03 13:40:07 | mark.dickinson | set | recipients:
+ mark.dickinson, WitcherGeralt |
2013-08-03 13:40:07 | mark.dickinson | set | messageid: <1375537207.25.0.0436984099259.issue18642@psf.upfronthosting.co.za> |
2013-08-03 13:40:07 | mark.dickinson | link | issue18642 messages |
2013-08-03 13:40:07 | mark.dickinson | create | |
|