##// END OF EJS Templates
py3: fix join(), min(), and max() template functions over string...
Yuya Nishihara -
r36562:a16fceb6 default
parent child Browse files
Show More
@@ -908,7 +908,7 b' def join(context, mapping, args):'
908 joiner = evalstring(context, mapping, args[1])
908 joiner = evalstring(context, mapping, args[1])
909
909
910 first = True
910 first = True
911 for x in joinset:
911 for x in pycompat.maybebytestr(joinset):
912 if first:
912 if first:
913 first = False
913 first = False
914 else:
914 else:
@@ -991,7 +991,7 b' def max_(context, mapping, args, **kwarg'
991
991
992 iterable = evalfuncarg(context, mapping, args[0])
992 iterable = evalfuncarg(context, mapping, args[0])
993 try:
993 try:
994 x = max(iterable)
994 x = max(pycompat.maybebytestr(iterable))
995 except (TypeError, ValueError):
995 except (TypeError, ValueError):
996 # i18n: "max" is a keyword
996 # i18n: "max" is a keyword
997 raise error.ParseError(_("max first argument should be an iterable"))
997 raise error.ParseError(_("max first argument should be an iterable"))
@@ -1006,7 +1006,7 b' def min_(context, mapping, args, **kwarg'
1006
1006
1007 iterable = evalfuncarg(context, mapping, args[0])
1007 iterable = evalfuncarg(context, mapping, args[0])
1008 try:
1008 try:
1009 x = min(iterable)
1009 x = min(pycompat.maybebytestr(iterable))
1010 except (TypeError, ValueError):
1010 except (TypeError, ValueError):
1011 # i18n: "min" is a keyword
1011 # i18n: "min" is a keyword
1012 raise error.ParseError(_("min first argument should be an iterable"))
1012 raise error.ParseError(_("min first argument should be an iterable"))
General Comments 0
You need to be logged in to leave comments. Login now