New submission from Terry J. Reedy <tjre...@udel.edu>: >>> 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 <rep...@bugs.python.org> <http://bugs.python.org/issue6453> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com