candide wrote:
bool(x) is nothing more than a shortcut for the following expression : True if x else False.
It's a much shorter and easier-to-read shortcut. Also keep in mind that if-else expressions are quite a recent addition to the language. Before that, we had 'not not x' as another equivalent -- Greg -- http://mail.python.org/mailman/listinfo/python-list