[web2py] Re: help with finding syntax error in nested if loop in view

2012-12-24 Thread Bhaskar Ramachandran
Hi Anthony, I think it is better to keep these if else (or for or while) statements in separate lines for clarity. Otherwise, it is causing trouble... For example. how would you interpret the statement below This assumes the following logic : if ... : if . : else:

[web2py] Re: help with finding syntax error in nested if loop in view

2012-12-24 Thread Anthony
> > It gets very difficult to apply the if.. else statements in more complex > situations inside the view html code if the basics are not clearly > understood. So i really want to understand the exact new syntax of using > the if... else... in view html files before i start using them more and

[web2py] Re: help with finding syntax error in nested if loop in view

2012-12-24 Thread Bhaskar Ramachandran
Hi Paolo, Roberto, Thank you very much. Paolo, Your response helped me with the issue. Your option A) worked very well!!. Thanks again... However your option B) gave incorrect result. Your That is, it is thinking of the statement as follows: if ... : if . : else

[web2py] Re: help with finding syntax error in nested if loop in view

2012-12-24 Thread Paolo Caruccio
"else:" statement is inline with "if" statement. the code wrapped in {{ }} follows python syntax rules. Alternatives below should be work (not tested): A) using ternary operator B) inline syntax with multiple {{ }} C) syntax not in line Il giorno martedì 25 dicembre 2012 00:40:01 UTC+1,