cycle.py
This file
Path
examples/basic/cycle.py
18 lines · 340 bytes · Python
Last changed by
Merge pull request #1133 from pallets/revert-renameDavid Lordbefore adoption15337f7
History of this fileTake it
The walk stopped after 200 commits: lines older than 793ddd4 point at it.
Merge pull request #1093 from cclauss/print-functionDavid Lordbefore adoption4c95c5f
line 1why, one step back1from __future__ import print_functionMerge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e
line 2why, one step back2Merge pull request #1133 from pallets/revert-renameDavid Lordbefore adoption15337f7
line 3why, one step back3from jinja2 import EnvironmentMerge branch '2.9-maintenance'Armin Ronacherbefore adoption793ddd4
line 4why, one step back4Merge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e
lines 5–10why, one step back5env = Environment(6 line_statement_prefix="#", variable_start_string="${", variable_end_string="}"7)8print(9 env.from_string(10 """\Merge branch '2.9-maintenance'Armin Ronacherbefore adoption793ddd4
lines 11–15why, one step back11<ul>12# for item in range(10)13 <li class="${loop.cycle('odd', 'even')}">${item}</li>14# endfor15</ul>\Merge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e
lines 16–18why, one step back16"""17 ).render()18)