> Are you arguing that the if/else form is better than simply casting 
> to bool because it is more explicit? 

No, I'm simply offering a reason to use if/else in the general sense.

In practice, for this specific case, I'd go with the bool(expr) form.

 Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to