bool constructor is inconsistent?

David Robinow drobinow at gmail.com
Fri Sep 10 21:56:38 CEST 2010


On Fri, Sep 10, 2010 at 2:35 PM, Stefan Schwarzer
<sschwarzer at sschwarzer.net> wrote:
> Hi Neal,
>
> On 2010-09-10 20:23, Neal Becker wrote:
>> IN [3]: bool('False')
>> Out[3]: True
>
> If you consider strings, only an empty string has a false
> value. So the string 'False' which is non-empty, results in
> a true boolean value.
> ...
 I've always felt that if a humorous post needs a smiley, that it's not funny.
However, there is the risk of being misunderstood.



More information about the Python-list mailing list