So much for writing my whole program on one line :-(<br>
<br>
j/k<br>
<br>
-Greg<br><br><div><span class="gmail_quote">On 10/26/05, <b class="gmail_sendername">Fredrik Lundh</b> <<a href="mailto:fredrik@pythonware.com">fredrik@pythonware.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Gregory Piņero wrote:<br><br>> Any idea why I can't say:<br>><br>> if 1:print 'a';else:print 'b'<br>><br>> all in one line like that?<br><br>because ";" can only be used to separate simple statements, not
<br>the different parts in a compound statement.<br><br>see the grammar for details:<br><br> <a href="http://docs.python.org/ref/grammar.txt">http://docs.python.org/ref/grammar.txt</a><br><br>(look for "compound_stmt", "suite", "statement", etc)
<br><br></F><br><br><br><br><br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>
Gregory Piņero<br>Chief Innovation Officer<br>Blended Technologies<br>(<a href="http://www.blendedtechnologies.com">www.blendedtechnologies.com</a>)