Permalink
Browse files

round filter: remove the special case for precission=0 in order to en…

…sure consistent output types on python3

--HG--
branch : trunk
  • Loading branch information...
1 parent dd0039c commit e589a3e20e3af316a13dc5db763d286fccca62c6 @RonnyPfannschmidt RonnyPfannschmidt committed Aug 17, 2010
Showing with 1 addition and 4 deletions.
  1. +1 −4 jinja2/filters.py
View
5 jinja2/filters.py
@@ -558,10 +558,7 @@ def do_round(value, precision=0, method='common'):
if method == 'common':
return round(value, precision)
func = getattr(math, method)
- if precision:
- return func(value * (10 ** precision)) / (10 ** precision)
- else:
- return func(value)
+ return func(value * (10 ** precision)) / (10 ** precision)
@environmentfilter

0 comments on commit e589a3e

Please sign in to comment.