On Mon, Jul 16, 2012 at 2:53 PM, Ranting Rick <rantingrickjohn...@gmail.com> wrote: > "if obj" is in essence doing "if bool(obj)" behind the scenes. My > question is: Why hide such valuable information from the reader? It's > obvious that "if bool(obj)" will return a boolean; whereas "if obj" is > ambiguous.
Proves nothing. At least when there are less names used, there's less possibility of monkey-patching. >>> def bool(n): ... return 5 ... >>> if bool([]): ... print("Yay?") ... Yay? ChrisA -- http://mail.python.org/mailman/listinfo/python-list