Python IF THEN chain equivalence

Paul Boddie paul at boddie.org.uk
Fri Nov 14 06:55:03 EST 2008


On 14 Nov, 00:19, jzakiya <jzak... at mail.com> wrote:
>
> It's interesting to see people think it's strange to have code that
> has multiple nested levels of IF THEN.  Apparently you haven't seen
> any Forth, assembly, et al code.

[...]

> Just as a suggestion :-)  a little humility would go a long way toward
> being open minded and receptive to different paradigms.

You might like to reflect on your own advice: those who responded to
your message aren't exactly new to programming. I've used a few
different assembly languages and none of them supported "multiple
nested levels of IF THEN" in the way illustrated. Indeed, "if"
statements (at the level employed by Python) were a luxury feature
you'd have needed to implement yourself as some kind of assembler
macro using branches or conditional execution modes on instructions.

> I asked a very narrow question about a very specific language
> mechanism, and I know exactly what and why I'm doing what I'm doing.

"When in Forthland speak Forth, please." Do those words look familiar?
I would recommend that you review the thread in which those words
appear with respect to Python.

Paul



More information about the Python-list mailing list