Home
last modified time | relevance | path

Searched refs:__round__ (Results 1 – 19 of 19) sorted by relevance

/third_party/python/Doc/library/
Dfractions.rst169 .. method:: __round__()
170 __round__(ndigits)
Dtyping.rst1920 An ABC with one abstract method ``__round__``
Dfunctions.rst1531 ``number.__round__``.
Dunittest.mock.rst2014 * ``__round__``, ``__floor__``, ``__trunc__`` and ``__ceil__``
/third_party/python/Lib/
Dnumbers.py189 def __round__(self, ndigits=None): member in Real
Dfractions.py612 def __round__(self, ndigits=None): member in Fraction
Dtyping.py2221 def __round__(self, ndigits: int = 0) -> T_co: member in SupportsRound
D_pydecimal.py1830 def __round__(self, n=None): member in Decimal
/third_party/python/Lib/unittest/test/testmock/
Dtestmagicmethods.py284 self.assertEqual(round(mock), mock.__round__())
310 self.assertEqual(round(mock), mock.__round__())
/third_party/python/Lib/test/
Dtest_decimal.py4492 self.assertEqual(str(Decimal("9.99").__round__()), "10")
4493 self.assertEqual(str(Decimal("9.99e-5").__round__()), "0")
4494 self.assertEqual(str(Decimal("1.23456789").__round__(5)), "1.23457")
4495 self.assertEqual(str(Decimal("1.2345").__round__(10)), "1.2345000000")
4496 self.assertEqual(str(Decimal("1.2345").__round__(-10)), "0E+10")
4498 self.assertRaises(TypeError, Decimal("1.23").__round__, "5")
4499 self.assertRaises(TypeError, Decimal("1.23").__round__, 5, 8)
5053 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5055 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5057 self.assertRaises(InvalidOperation, Decimal("1").__round__,
[all …]
Dtest_builtin.py1411 def __round__(self): member in BuiltinTest.test_round.TestRound
1423 t.__round__ = lambda *args: args
/third_party/protobuf/python/google/protobuf/internal/
Dtest_util.py864 def __round__(self): member in NonStandardInteger
/third_party/python/Modules/_decimal/tests/
Ddeccheck.py559 def __round__(self, t): member in SkipHandler
/third_party/python/Python/
Dbltinmodule.c16 _Py_IDENTIFIER(__round__);
/third_party/python/Doc/whatsnew/
D3.0.rst816 delegates to ``x.__round__([n])`` instead of always returning a
/third_party/python/Tools/c-analyzer/
DTODO497 Python/bltinmodule.c:PyId___round__ _Py_IDENTIFIER(__round__)
/third_party/python/Doc/reference/
Ddatamodel.rst2679 .. method:: object.__round__(self, [,ndigits])
2688 Unless *ndigits* is passed to :meth:`!__round__` all these methods should
/third_party/python/Misc/NEWS.d/
D3.8.0a1.rst4759 :class:`unittest.mock.MagicMock` now supports the ``__round__`` magic
/third_party/python/Misc/
DHISTORY4447 - Issue #17722: When looking up __round__, resolve descriptors.
16780 - The Decimal module gained the magic methods __round__, __ceil__,