Re: Python IF THEN chain equivalence

2008-11-16 Thread Steve Holden
jzakiya wrote: > On Nov 13, 5:48 pm, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: >> On 2008-11-13 23:31, jzakiya wrote: >> >> >> >>> On Nov 13, 5:21 pm, Alan Baljeu <[EMAIL PROTECTED]> wrote: I think you should rethink your post. The first case you posted makes no sense in any language I

Re: Python IF THEN chain equivalence

2008-11-14 Thread Steven D'Aprano
On Fri, 14 Nov 2008 01:24:32 +0100, M.-A. Lemburg wrote: >> Apparently you haven't seen >> any Forth, assembly, et al code. All you're doing is having the branch >> point for each conditional be the end of the chain, otherwise it falls >> through to the code after the conditional. This is done al

Re: Python IF THEN chain equivalence

2008-11-14 Thread Paul Boddie
On 14 Nov, 00:19, jzakiya <[EMAIL PROTECTED]> 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

Re: Python IF THEN chain equivalence

2008-11-13 Thread Ethan Furman
Grant Edwards wrote: On 2008-11-14, Ethan Furman <[EMAIL PROTECTED]> wrote: jzakiya wrote: I'm translating a program in Python that has this IF Then chain IF x1 < limit: --- do a --- IF x2 < limit: --- do b --- IF x3 < limit: --- do c --- .-

Re: Python IF THEN chain equivalence

2008-11-13 Thread Grant Edwards
On 2008-11-14, Ethan Furman <[EMAIL PROTECTED]> wrote: > jzakiya wrote: >> I'm translating a program in Python that has this IF Then chain >> >> >> IF x1 < limit: --- do a --- >> IF x2 < limit: --- do b --- >> IF x3 < limit: --- do c --- >>.- >>

Re: Python IF THEN chain equivalence

2008-11-13 Thread Ethan Furman
jzakiya wrote: I'm translating a program in Python that has this IF Then chain IF x1 < limit: --- do a --- IF x2 < limit: --- do b --- IF x3 < limit: --- do c --- .- -- IF x10 < limt: --- do j ---

Re: Python IF THEN chain equivalence

2008-11-13 Thread Mensanator
On Nov 13, 4:39 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-11-13, jzakiya <[EMAIL PROTECTED]> wrote: > > > I'm translating a program in Python that has this IF Then chain > > > IF  x1 < limit:   --- do a --- > >     IF  x2 < limit:  --- do b --- > >         IF x3 < limit:  --- do c ---

Re: Python IF THEN chain equivalence

2008-11-13 Thread bearophileHUGS
jzakiya: > 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. You are of course free to use Python as you want. And probably some of the answers weren't fully polite. But it's interesting to see why they have given s

Re: Python IF THEN chain equivalence

2008-11-13 Thread M.-A. Lemburg
On 2008-11-14 00:19, jzakiya wrote: > On Nov 13, 5:48 pm, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: From: jzakiya <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Thursday, November 13, 2008 5:06:53 PM Subject: Python IF THEN chain equivalence I'm translating a program in P

Re: Python IF THEN chain equivalence

2008-11-13 Thread jzakiya
On Nov 13, 5:48 pm, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: > On 2008-11-13 23:31, jzakiya wrote: > > > > > On Nov 13, 5:21 pm, Alan Baljeu <[EMAIL PROTECTED]> wrote: > >> I think you should rethink your post. The first case you posted makes no > >> sense in any language I know.  Also, a whole

Re: Python IF THEN chain equivalence

2008-11-13 Thread M.-A. Lemburg
On 2008-11-13 23:31, jzakiya wrote: > On Nov 13, 5:21 pm, Alan Baljeu <[EMAIL PROTECTED]> wrote: >> I think you should rethink your post. The first case you posted makes no >> sense in any language I know. Also, a whole lot of nested IF's is a bad >> idea in any language. In Python, you will en

Re: Python IF THEN chain equivalence

2008-11-13 Thread Grant Edwards
On 2008-11-13, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-11-13, jzakiya <[EMAIL PROTECTED]> wrote: >> I'm translating a program in Python that has this IF Then chain >> >> >> IF x1 < limit: --- do a --- >> IF x2 < limit: --- do b --- >> IF x3 < limit: --- do c --- >>

Re: Python IF THEN chain equivalence

2008-11-13 Thread Grant Edwards
On 2008-11-13, jzakiya <[EMAIL PROTECTED]> wrote: > I'm translating a program in Python that has this IF Then chain > > > IF x1 < limit: --- do a --- > IF x2 < limit: --- do b --- > IF x3 < limit: --- do c --- >.- > -- >

Re: Python IF THEN chain equivalence

2008-11-13 Thread jzakiya
On Nov 13, 5:21 pm, Alan Baljeu <[EMAIL PROTECTED]> wrote: > I think you should rethink your post. The first case you posted makes no > sense in any language I know.  Also, a whole lot of nested IF's is a bad idea > in any language.  In Python, you will end up with code indented 40+ > characters

Re: Python IF THEN chain equivalence

2008-11-13 Thread Alan Baljeu
I think you should rethink your post. The first case you posted makes no sense in any language I know. Also, a whole lot of nested IF's is a bad idea in any language. In Python, you will end up with code indented 40+ characters if you keep going. - Original Message From: jzakiya <[

Re: Python IF THEN chain equivalence

2008-11-13 Thread Diez B. Roggisch
jzakiya schrieb: I'm translating a program in Python that has this IF Then chain IF x1 < limit: --- do a --- IF x2 < limit: --- do b --- IF x3 < limit: --- do c --- .- -- IF x10 < limt: --- do j ---