Skip to content
Myr

Fixed #367 by improving the documentation.

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

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 7fd4ad6 · Browse files · 1 file+9 added−1 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+9 added−1 removed

  • other:+9 added−1 removed

1 file+9 added−1 removed

modified:jinja2/filters.py+9 added-1 removed
529 unmodified lines
530531 .. sourcecode:: jinja532533 {{ 42.55|round }}534 -> 43534 -> 43.0535 {{ 42.55|round(1, 'floor') }}536 -> 42.5537538 Note that even if rounded to 0 precision, a float is returned. If539 you need a real integer, pipe it through `int`:540541 .. sourcecode:: jinja542543 {{ 42.55|round|int }}544 -> 43545 """546 if not method in ('common', 'ceil', 'floor'):547 raise FilterArgumentError('method must be common, ceil or floor')548 if precision < 0:
175 unmodified lines