Home
last modified time | relevance | path

Searched refs:to_integral_value (Results 1 – 6 of 6) sorted by relevance

/external/python/cpython3/Lib/test/
Dtest_decimal.py2368 ans = str(Decimal('1.5').to_integral_value(rounding=None, context=None))
2371 ans = str(Decimal('1.5').to_integral_value(rounding=None, context=None))
2373 ans = str(Decimal('1.5').to_integral_value(rounding=ROUND_UP, context=None))
2376 self.assertRaises(InvalidOperation, Decimal('sNaN').to_integral_value, context=None)
2698 self.assertEqual(D("123").to_integral_value(context=xc), 123)
3554 d = c.to_integral_value(Decimal(10))
3555 self.assertEqual(c.to_integral_value(10), d)
3556 self.assertRaises(TypeError, c.to_integral_value, '10')
3557 self.assertRaises(TypeError, c.to_integral_value, 10, 'x')
5080 self.assertEqual(x.to_integral_value(), 10)
[all …]
/external/python/cpython2/Lib/
Ddecimal.py970 op = _WorkRep(self.to_integral_value())
1924 base = _WorkRep(self.to_integral_value())
1925 exponent = _WorkRep(other.to_integral_value())
2592 def to_integral_value(self, rounding=None, context=None): member in Decimal
2609 to_integral = to_integral_value
5406 def to_integral_value(self, a): member in Context
5433 return a.to_integral_value(context=self)
5436 to_integral = to_integral_value
/external/python/cpython3/Lib/
D_pydecimal.py2040 base = _WorkRep(self.to_integral_value())
2041 exponent = _WorkRep(other.to_integral_value())
2698 def to_integral_value(self, rounding=None, context=None): member in Decimal
2715 to_integral = to_integral_value
5582 def to_integral_value(self, a): member in Context
5609 return a.to_integral_value(context=self)
5612 to_integral = to_integral_value
/external/python/cpython2/Lib/test/
Dtest_decimal.py2220 d = c.to_integral_value(Decimal(10))
2221 self.assertEqual(c.to_integral_value(10), d)
2222 self.assertRaises(TypeError, c.to_integral_value, '10')
/external/python/cpython2/Doc/library/
Ddecimal.rst896 Identical to the :meth:`to_integral_value` method. The ``to_integral``
909 .. method:: to_integral_value([rounding[, context]])
916 renamed from ``to_integral`` to ``to_integral_value``. The old name
/external/python/cpython3/Doc/library/
Ddecimal.rst871 Identical to the :meth:`to_integral_value` method. The ``to_integral``
882 .. method:: to_integral_value(rounding=None, context=None)