Re: 'IF' Syntax For Alternative Conditions

2007-02-08 Thread rshepard
On 2007-02-08, Paul Rubin wrote: > [EMAIL PROTECTED] writes: >> if cond1: >> if cond2: >> do_something. > > You can write: >if cond1 and cond2: > do_something > >> if cond1 OR if cond2: >> do_something. > > if cond1 or cond2: >do_something > >

Re: 'IF' Syntax For Alternative Conditions

2007-02-08 Thread James Stroud
[EMAIL PROTECTED] wrote: > All my python books and references I find on the web have simplistic > examples of the IF conditional. A few also provide examples of multiple > conditions that are ANDed; e.g., > if cond1: > if cond2: > do_something. > > However, I cann

Re: 'IF' Syntax For Alternative Conditions

2007-02-08 Thread Duncan Booth
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > Note that most (if not all) Python keywords are lowercase. > All keywords are lower case. and del from not while aselif globalorwith assertelse ifpass yield break

Re: 'IF' Syntax For Alternative Conditions

2007-02-07 Thread Gabriel Genellina
En Thu, 08 Feb 2007 01:01:38 -0300, <[EMAIL PROTECTED]> escribió: > However, I cannot find, nor create by trial-and-error, the syntax for > alternative conditions that are ORed; e.g., > > if cond1 OR if cond2: > do_something. > > Please pass me a pointer so I can learn how to

Re: 'IF' Syntax For Alternative Conditions

2007-02-07 Thread Paul Rubin
[EMAIL PROTECTED] writes: > if cond1: > if cond2: > do_something. You can write: if cond1 and cond2: do_something > if cond1 OR if cond2: > do_something. if cond1 or cond2: do_something > I've tried using the C syntax for OR (||) but p

Re: 'IF' Syntax For Alternative Conditions

2007-02-07 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: > However, I cannot find, nor create by trial-and-error, the syntax for > alternative conditions that are ORed; e.g., > > if cond1 OR if cond2: > do_something. if cond1 or cond2: do_something() -- http://mail.python.org/mailman/listinfo/python-list

'IF' Syntax For Alternative Conditions

2007-02-07 Thread rshepard
All my python books and references I find on the web have simplistic examples of the IF conditional. A few also provide examples of multiple conditions that are ANDed; e.g., if cond1: if cond2: do_something. However, I cannot find, nor create by trial-and-er