Implicit conversion to boolean in if and while statements
gandalf at shopzeus.com
Mon Jul 16 23:17:58 CEST 2012
>> Traceback (most recent quip last):
>> Author: "<DeAprano>", line 7, in <post>
>> LogicalFallacyError: "Reductio ad absurdum"
> Deary deary me Rick. Reductio ad adsurdum is not a fallacy. It is a
> counter-argument to an argument or claim, by showing that the premise of
> the original claim leads to an absurd conclusion.
> You have claimed that we should always be explicit whenever we write. But
> you do not actually live up to your own advice, because you can't: it is
> absurd to try to be explicit about everything all the time. You have
> misunderstood the purpose of the Zen of Python: it is not to claim that
> everything should be explicit, but to avoid code that is hard to
> understand because things which need to be explicit for clarity are
> implied by other parts of your code.
I agree. There is no pont in abolutizing explicitness anyway. It is not
a yes/no question. You cannot tell that somebody is "not explicit". It
is not something that can be decided. But you can say that he was "not
explicit enough" in a concrete case. There is an accepted level of
explicitness. You can probably always be more expicit, or less explicit.
Being more explicit is not the goal. But is a good practice to be more
explicit if it helps you achieve the real goal. For example, writting a
program that can be maintained easily.
More information about the Python-list