Coding style

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Fri Jul 21 17:25:14 EDT 2006


Lawrence D'Oliveiro a écrit :
> In message <e9ksvr$g8u$1 at news.albasani.net>, Georg Brandl wrote:
> 
> 
(snip)

>>Other than in PHP, Python has clear rules when an object of a builtin type
>>is considered false (i.e. when it's empty). So why not take advantage of
>>this?
>  
> Because the clearest rule of all is that True is true, and False is false,
> and that's all I want to have to remember.

I somewhat agree with Laura Craighton (cf Donn's post above in this 
thread). Things were clearer when there was no boolean type in Python, 
and we just had the difference between 'nothing' (empty sequence, zero 
numeric, None) and 'something' (almost anything else).



More information about the Python-list mailing list