-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Linux Mint 17.3 64-bit
Python 2.7.6
Jinja 2.8.1:
>>> import jinja2
>>> jinja2.Template('{% for value in values recursive %}1{% else %}0{% endfor %}').render(values=[])
u'0'
Jinja 2.9-2.9.4:
>>> import jinja2
>>> jinja2.Template('{% for value in values recursive %}1{% else %}0{% endfor %}').render(values=[])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ustr/environ/local/lib/python2.7/site-packages/jinja2/environment.py", line 945, in __new__
return env.from_string(source, template_class=cls)
File "/home/ustr/environ/local/lib/python2.7/site-packages/jinja2/environment.py", line 880, in from_string
return cls.from_code(self, self.compile(source), globals, None)
File "/home/ustr/environ/local/lib/python2.7/site-packages/jinja2/environment.py", line 588, in compile
return self._compile(source, filename)
File "/home/ustr/environ/local/lib/python2.7/site-packages/jinja2/environment.py", line 551, in _compile
return compile(source, filename, 'exec')
File "<template>", line 25
SyntaxError: 'return' with argument inside generator
Reactions are currently unavailable