Question About Logic In Python

Bryan Olson fakeaddress at nowhere.org
Fri Sep 23 14:01:36 EDT 2005


Steven D'Aprano wrote:

> Or wait, I have thought of one usage case: if you are returning a value
> that you know will be used only as a flag, you should convert it into a
> bool. Are there any other uses for bool()?

We could, of course, get along without it. One use for
canonical true and false values is to give 'not' something
sensible to return.


-- 
--Bryan



More information about the Python-list mailing list