Thanks:)
But I saw some different codes on the same page:
Another example:
$def tr(values):
<tr>
$for v in values:
<td>$v</td>
</tr>
$def table(rows):
<table>
$for row in rows:
$:row
</table>
Here, colon and indentation are used.
I'm confused.
Of course, the best way to solve this is to test it myself....
I just hope the confusion could remind our guys of the ambiguity of the
documentation.
在 2012年4月19日星期四UTC+8下午12时30分31秒,Anand写道:
>
>
>
> On Thu, Apr 19, 2012 at 9:07 AM, Makto <[email protected]> wrote:
>
>> I saw the example in the web.py
>> documentation<http://webpy.org/docs/0.3/templetor>
>> :
>>
>> Here is a simple template:
>>
>> $def with (name)
>> Hello $name!
>>
>>
>>
>> There's no indentation and even colon, which I'm familiar in Python, in
>> the first line.
>> Is this format designed to be and required?
>>
>
> Yes.
>
>
>> Or both are OK?
>>
>
> No.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/webpy/-/GrAxXMfP_ZsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.