diff options
author | László Németh <nemeth@numbertext.org> | 2014-05-15 13:03:17 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2014-05-15 13:06:22 +0200 |
commit | 38b1410ca674bd47d218e4e77cf90e6adcc6d87c (patch) | |
tree | 3a1addd19f223810d95a69752eff723493ee56fe /hu_HU/pythonpath | |
parent | 117686ef79d5a2a42e328dcef8af3969af933700 (diff) |
fix LightProof measurement conversion for Python 3
Change-Id: I6d36bc804271956e1c8649df0832615311fcf5e1
Diffstat (limited to 'hu_HU/pythonpath')
-rw-r--r-- | hu_HU/pythonpath/lightproof_impl_hu_HU.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hu_HU/pythonpath/lightproof_impl_hu_HU.py b/hu_HU/pythonpath/lightproof_impl_hu_HU.py index 62e0025..d88c136 100644 --- a/hu_HU/pythonpath/lightproof_impl_hu_HU.py +++ b/hu_HU/pythonpath/lightproof_impl_hu_HU.py @@ -244,7 +244,7 @@ paralcap = re.compile(u"(?u)^[a-z\xf6\xfc\xf3\u0151\xfa\xe9\xe1\u0171\xed].*[.?! def measurement(mnum, min, mout, mstr): m = calc("CONVERT_ADD", (float(mnum.replace(",", ".").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 + "|").join(a).replace(".", ",").replace("-", u"\u2212") + mstr |