summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-27 14:23:40 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-09-27 14:23:40 (GMT)
commit4837a223eea09681f0bf41d41882cad5ade0f6ab (patch)
tree6dd21b9288213c392c6527bb05659f747de40145 /Lib
parenta4c6a8522c5033cc6627cb8b0cfc81c75711afee (diff)
downloadcpython-4837a223eea09681f0bf41d41882cad5ade0f6ab.zip
cpython-4837a223eea09681f0bf41d41882cad5ade0f6ab.tar.gz
cpython-4837a223eea09681f0bf41d41882cad5ade0f6ab.tar.bz2
Use floor division operator.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/decimal.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 950af60..b7c893d 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -1924,7 +1924,7 @@ class Decimal(object):
tmp = Decimal(self)
- expadd = tmp._exp / 2
+ expadd = tmp._exp // 2
if tmp._exp & 1:
tmp._int += (0,)
tmp._exp = 0
@@ -1939,12 +1939,12 @@ class Decimal(object):
ans = Decimal( (0, (8,1,9), tmp.adjusted() - 2) )
ans = ans.__add__(tmp.__mul__(Decimal((0, (2,5,9), -2)),
context=context), context=context)
- ans._exp -= 1 + tmp.adjusted()/2
+ ans._exp -= 1 + tmp.adjusted() // 2
else:
ans = Decimal( (0, (2,5,9), tmp._exp + len(tmp._int)- 3) )
ans = ans.__add__(tmp.__mul__(Decimal((0, (8,1,9), -3)),
context=context), context=context)
- ans._exp -= 1 + tmp.adjusted()/2
+ ans._exp -= 1 + tmp.adjusted() // 2
#ans is now a linear approximation.