Request for feedback on my first Python program

Erik Max Francis max at alcyone.com
Sun Jun 1 00:21:55 EDT 2003


Sean Legassick wrote:

> I specifically wanted to point out that
> 
> if X:
>    return True
> else:
>    return False
> 
> is a particularly ugly and surprisingly common redundancy - in many
> languages...

What you write here is not necessarily redundant, provided that X is not
a Boolean.  There may be more compact ways to write it, but that doesn't
mean that the above code is wrong.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ I am a gentlemen:  I live by robbing the poor.
\__/  George Bernard Shaw




More information about the Python-list mailing list