diff options
Diffstat (limited to 'src/en/en.dat')
-rw-r--r-- | src/en/en.dat | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/en/en.dat b/src/en/en.dat index 789a405..4a8a965 100644 --- a/src/en/en.dat +++ b/src/en/en.dat @@ -378,6 +378,6 @@ def measurement(mnum, min, mout, mstr, decimal, remove): mnum = mnum.replace(" 1/2", ".5").replace(u" ½", ".5").replace(u"½",".5") m = calc("CONVERT_ADD", (float(eval(mnum.replace(remove, "").replace(decimal, ".").replace(u"−", "-"))), min, mout)) a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items - a.sort(lambda x, y: len(x) - len(y)) # sort by string length + a.sort(key=lambda x: len(x)) # sort by string length return (mstr + "\n").join(a).replace(".", decimal).replace("-", u"−") + mstr |