summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 51758f2..1652914 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -1451,6 +1451,8 @@ class Decimal(_numbers.Real, _numbers.Inexact):
else:
return s*int(self._int[:self._exp] or '0')
+ __trunc__ = __int__
+
def _fix_nan(self, context):
"""Decapitate the payload of a NaN to fit the context"""
payload = self._int