I have tried and errored a reasonable amount of times

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Sep 3 03:44:14 CEST 2014


Grant Edwards wrote:

> I missed the beginning of the thread, but Why are you comparing things
> to True and False?

I don't understand why people do it, but it's *incredibly* common. A couple
of weeks ago at work, I had to (gently, in a friendly manner) mock one of
our most senior and accomplished developers for doing exactly that. He was
suitably chagrined :-)

And then I wondered back to my desk and promptly found myself doing the same
thing :-(

I think it may have something to do with the linguistic idiom in English
where we distinguish between logical statements and logical statements
about logical statements for emphasis. E.g., suppose we have a syllogism:

    Plato is a mortal.
    All mortals must eat.
    Therefore Plato must eat.

and we wanted to analyse it, we might say something like:

    Given the undeniable truth that Plato is, in fact, a mortal, then 
    if the statement `all mortals must eat` is true [i.e. is a true
    statement], then `Plato must eat` likewise is true.

to emphasis that we are making a statement about the truth of the statement
`all mortals must eat`.

I'm not suggesting that this is the only way to talk about the truth or
falsity of statements in English, but it is a very common one:

https://www.google.com.au/search?q=%22if+*+is+true%22


-- 
Steven




More information about the Python-list mailing list