[mod_python] Nested loops in PSP

Miikka Miettinen mmmietti at cs.Helsinki.FI
Mon Aug 30 13:59:02 EDT 2004


I wonder what makes the comment in the outer loop significant. The first 
piece of code works, but the second doesn't. Is this a bug or have I 
misunderstood the syntax?

---
<%
for i in range(5):
    # begin
%>
<%= i %><br>
<%
    for j in range(5):
%>
<%= i %>, <%= j %><br>
<%
%>
---
<%
for i in range(5):
%>
<%= i %><br>
<%
    for j in range(5):
%>
<%= i %>, <%= j %><br>
<%
%>
---


More information about the Mod_python mailing list