summaryrefslogtreecommitdiff
path: root/pt_BR
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2014-05-15 13:03:17 +0200
committerLászló Németh <nemeth@numbertext.org>2014-05-15 13:06:22 +0200
commit38b1410ca674bd47d218e4e77cf90e6adcc6d87c (patch)
tree3a1addd19f223810d95a69752eff723493ee56fe /pt_BR
parent117686ef79d5a2a42e328dcef8af3969af933700 (diff)
fix LightProof measurement conversion for Python 3
Change-Id: I6d36bc804271956e1c8649df0832615311fcf5e1
Diffstat (limited to 'pt_BR')
-rw-r--r--pt_BR/pythonpath/lightproof_impl_pt_BR.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pt_BR/pythonpath/lightproof_impl_pt_BR.py b/pt_BR/pythonpath/lightproof_impl_pt_BR.py
index 8d0100f..8611ee5 100644
--- a/pt_BR/pythonpath/lightproof_impl_pt_BR.py
+++ b/pt_BR/pythonpath/lightproof_impl_pt_BR.py
@@ -24417,7 +24417,7 @@ def measurement(mnum, min, mout, mstr, decimal, remove):
mnum = mnum.replace(" 1/2", ".5").replace(u" \xbd", ".5").replace(u"\xbd",".5")
m = calc("CONVERT_ADD", (float(eval(mnum.replace(remove, "").replace(decimal, ".").replace(u"\u2212", "-"))), 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"\u2212") + mstr