Skip to content
Myr

Don't check for generator if not needed

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Martin Krizek · committed by Martin Krizek · parent 9ef99dc · Browse files · 1 file+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:jinja2/nativetypes.py+2 added-3 removed
19 unmodified lines
2021 if not head:22 return None2324 if isinstance(nodes, types.GeneratorType):25 nodes = chain(head, nodes)2624 if len(head) == 1:25 out = head[0]26 else:27 if isinstance(nodes, types.GeneratorType):28 nodes = chain(head, nodes)29 out = u''.join([text_type(v) for v in nodes])3031 try:32 return literal_eval(out)
191 unmodified lines