reduce()--what is it good for? (was: Re: reduce() anomaly?)

Georgy Pruss see_signature__ at hotmail.com
Tue Nov 18 01:06:27 EST 2003


"Steve Lamb" <grey at despair.dmiyu.org> wrote in message news:slrnbrio3f.s51.grey at dmiyu.org...
| <..>
|     Because as much as it helps when reading the code to only have to learn a
| minimal set of controls the same applies to writing code as well.  When I
| approach a problem I don't have to agonize over "well, should I do a
| do...until(), a for(;;), a while(), or something else?"  It breaks down to
| this.

I can't agree here. I NEVER wondered which of constructions should I
use in any particular case. I just solved the problem and wrote its solution
in that language and the language HELPED me to express myself clearly.

| Is it a sequence?  For.  Is it a condition to be met?  While.  There,
| done, move along.

Aha. Half of all the conditions in real Python programs are 1 or True. :-)

| -- 
|          Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
|        PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
| -------------------------------+---------------------------------------------

-- 
Georgy Pruss
E^mail: 'ZDAwMTEyMHQwMzMwQGhvdG1haWwuY29t\n'.decode('base64')






More information about the Python-list mailing list