this works when placed inside a view:

{{
def myfunc(rows):
    text=[]
    for x in rows:
        text.append(...stuff...)
    pass
pass
}}

this gets ticketed when inside a view:
{{
def myfunc(rows):
    text=[]
    for x in rows:  # AN INNOCENT COMMENT THAT CAUSES TICKET
        text.append(...stuff...)
    pass
pass
}}

Traceback (most recent call last):
  File "N:\web2py\gluon\restricted.py", line 203, in restricted
    ccode = compile2(code,layer)
  File "N:\web2py\gluon\restricted.py", line 189, in compile2
    return compile(code.rstrip().replace('\r\n','\n')+'\n', layer,
'exec')
  File "N:\web2py\applications\myapp\views\myview/index.load", line 54
    text.append(
       ^
IndentationError: expected an indented block

Reply via email to