Home
last modified time | relevance | path

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

/external/fonttools/Lib/fontTools/misc/
DarrayTools.py192 def __round__(self): member in Vector
195 return self.__round__()
/external/python/cpython3/Doc/library/
Dfractions.rst165 .. method:: __round__()
166 __round__(ndigits)
Dtyping.rst621 An ABC with one abstract method ``__round__``
Dfunctions.rst1458 ``number.__round__``.
Dunittest.mock.rst2009 * ``__round__``, ``__floor__``, ``__trunc__`` and ``__ceil__``
/external/python/cpython3/Lib/
Dnumbers.py189 def __round__(self, ndigits=None): member in Real
Dfractions.py531 def __round__(self, ndigits=None): member in Fraction
Dtyping.py1584 def __round__(self, ndigits: int = 0) -> T_co: member in SupportsRound
D_pydecimal.py1826 def __round__(self, n=None): member in Decimal
/external/python/cpython3/Lib/unittest/test/testmock/
Dtestmagicmethods.py285 self.assertEqual(round(mock), mock.__round__())
311 self.assertEqual(round(mock), mock.__round__())
/external/python/cpython3/Lib/test/
Dtest_decimal.py4462 self.assertEqual(str(Decimal("9.99").__round__()), "10")
4463 self.assertEqual(str(Decimal("9.99e-5").__round__()), "0")
4464 self.assertEqual(str(Decimal("1.23456789").__round__(5)), "1.23457")
4465 self.assertEqual(str(Decimal("1.2345").__round__(10)), "1.2345000000")
4466 self.assertEqual(str(Decimal("1.2345").__round__(-10)), "0E+10")
4468 self.assertRaises(TypeError, Decimal("1.23").__round__, "5")
4469 self.assertRaises(TypeError, Decimal("1.23").__round__, 5, 8)
5023 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5025 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5027 self.assertRaises(InvalidOperation, Decimal("1").__round__,
[all …]
Dtest_builtin.py1330 def __round__(self): member in BuiltinTest.test_round.TestRound
1342 t.__round__ = lambda *args: args
/external/python/mock/
DCHANGELOG.rst58 ``__round__`` magic method.
/external/python/mock/mock/tests/
Dtestmagicmethods.py341 self.assertEqual(round(mock), mock.__round__())
/external/python/pyasn1/pyasn1/type/
Duniv.py221 def __round__(self, n=0): member in Integer
1489 def __round__(self, n=0): member in Real
/external/python/cpython3/Modules/_decimal/tests/
Ddeccheck.py524 def __round__(self, t): member in SkipHandler
/external/protobuf/python/google/protobuf/internal/
Dtest_util.py864 def __round__(self): member in NonStandardInteger
/external/python/cpython3/Python/
Dbltinmodule.c13 _Py_IDENTIFIER(__round__);
/external/fonttools/Lib/fontTools/ttLib/tables/
D_g_l_y_f.py1606 def __round__(self): member in GlyphCoordinates
/external/python/pyasn1/
DCHANGES.rst402 (e.g. __pos__, __neg__, __round__, __floor__, __ceil__, __trunc__)
/external/python/cpython3/Doc/whatsnew/
D3.0.rst816 delegates to ``x.__round__([n])`` instead of always returning a
/external/python/cpython3/Doc/reference/
Ddatamodel.rst2433 .. method:: object.__round__(self, [,ndigits])
2442 Unless *ndigits* is passed to :meth:`!__round__` all these methods should
/external/python/cpython3/Misc/NEWS.d/
D3.8.0a1.rst4759 :class:`unittest.mock.MagicMock` now supports the ``__round__`` magic
/external/python/cpython3/Misc/
DHISTORY4447 - Issue #17722: When looking up __round__, resolve descriptors.
16780 - The Decimal module gained the magic methods __round__, __ceil__,