Sorted display of options in Func.__repr__().

This commit is contained in:
orf 2017-07-21 01:51:07 +01:00 committed by Tim Graham
parent 487362fa8f
commit 7dfe03f86d
1 changed files with 1 additions and 1 deletions

View File

@ -533,7 +533,7 @@ class Func(Expression):
args = self.arg_joiner.join(str(arg) for arg in self.source_expressions) args = self.arg_joiner.join(str(arg) for arg in self.source_expressions)
extra = dict(self.extra, **self._get_repr_options()) extra = dict(self.extra, **self._get_repr_options())
if extra: if extra:
extra = ', '.join(str(key) + '=' + str(val) for key, val in extra.items()) extra = ', '.join(str(key) + '=' + str(val) for key, val in sorted(extra.items()))
return "{}({}, {})".format(self.__class__.__name__, args, extra) return "{}({}, {})".format(self.__class__.__name__, args, extra)
return "{}({})".format(self.__class__.__name__, args) return "{}({})".format(self.__class__.__name__, args)