
report at bugs
Jul 9, 2009, 2:21 PM
Post #1 of 8
(342 views)
Permalink
|
|
[issue6453] Improve bool TypeError message
|
|
New submission from Terry J. Reedy <tjreedy [at] udel>: >>> cc=c() >>> bool(cc) Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> bool(cc) TypeError: __bool__ should return bool or int, returned int This is slightly jarring. Adding ' 0 or 1' after 'or int' would be nice (and trivial). Adding str(val) at the end after type(val) would be even nicer. ---------- components: Interpreter Core keywords: easy messages: 90355 nosy: tjreedy severity: normal status: open title: Improve bool TypeError message type: feature request versions: Python 3.2 _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue6453> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|