Opened 13 years ago
Last modified 12 years ago
#428 reopened defect
UndefinedError in py:for — at Initial Version
Reported by: | anonymous | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Template processing | Version: | devel |
Keywords: | python3 UndefinedError | Cc: |
Description
This is the code I'm running in the Python interpreter from the Documentation:
from genshi.template import MarkupTemplate? tmpl = MarkupTemplate?(<ul xmlns:py="http://genshi.edgewall.org/">
... <li py:for="item in items">${item}</li> ... </ul>)
print(tmpl.generate(items=[1, 2, 3]))
<ul>
<li>1</li><li>2</li><li>3</li>
</ul>
And I'm getting an UndefinedError? for the variable item. If I force lenient mode, the template simply does not evaluate.
Note: See
TracTickets for help on using
tickets.