Home
last modified time | relevance | path

Searched refs:__trunc__ (Results 1 – 18 of 18) sorted by relevance

/third_party/python/Lib/test/
Dtest_int.py365 def __trunc__(self): member in IntTestCases.test_intconversion.IntOverridesTrunc
370 def __trunc__(self): member in IntTestCases.test_intconversion.JustTrunc
375 def __trunc__(self): member in IntTestCases.test_intconversion.ExceptionalTrunc
386 def __trunc__(self): member in IntTestCases.test_intconversion.TruncReturnsNonInt
395 def __trunc__(self): member in IntTestCases.test_intconversion.TruncReturnsNonIndex
400 def __trunc__(self): member in IntTestCases.test_intconversion.NonIntegral
405 def __trunc__(self): member in IntTestCases.test_intconversion.TruncReturnsNonIntegral
423 def __trunc__(self): member in IntTestCases.test_intconversion.TruncReturnsBadInt
479 def __trunc__(self): member in IntTestCases.test_int_returns_int_subclass.TruncReturnsBadIndex
483 def __trunc__(self): member in IntTestCases.test_int_returns_int_subclass.TruncReturnsBadInt
[all …]
Dtest_math.py1551 def __trunc__(self): member in MathTests.test_trunc.TestTrunc
1554 def __trunc__(self): member in MathTests.test_trunc.FloatTrunc
Dtest_long.py393 def __trunc__(self): member in LongTest.test_conversion.LongTrunc
/third_party/python/Lib/
Dnumbers.py166 def __trunc__(self): member in Real
Dfractions.py596 def __trunc__(a): member in Fraction
D_pydecimal.py1633 __trunc__ = __int__ variable in Decimal
/third_party/python/Lib/unittest/test/testmock/
Dtestmagicmethods.py285 self.assertEqual(math.trunc(mock), mock.__trunc__())
311 self.assertEqual(math.trunc(mock), mock.__trunc__())
/third_party/python/Doc/library/
Dmath.rst303 :meth:`x.__trunc__() <object.__trunc__>`.
Dfunctions.rst859 it returns ``x.__index__()``. If *x* defines :meth:`__trunc__`,
860 it returns ``x.__trunc__()``.
Dunittest.mock.rst2014 * ``__round__``, ``__floor__``, ``__trunc__`` and ``__ceil__``
/third_party/protobuf/python/google/protobuf/internal/
Dtest_util.py783 def __trunc__(self): member in NonStandardInteger
/third_party/python/Modules/
Dmathmodule.c2114 _Py_IDENTIFIER(__trunc__); in math_trunc()
/third_party/python/Objects/
Dabstract.c1535 _Py_IDENTIFIER(__trunc__); in PyNumber_Long()
/third_party/python/Misc/NEWS.d/
D3.5.2rc1.rst321 Fixed crash on converting objects with special methods __bytes__, __trunc__,
D3.6.0a1.rst536 Fixed crash on converting objects with special methods __bytes__, __trunc__,
/third_party/python/Tools/c-analyzer/
DTODO331 Objects/abstract.c:PyNumber_Long():PyId___trunc__ _Py_IDENTIFIER(__trunc__)
/third_party/python/Doc/reference/
Ddatamodel.rst2680 object.__trunc__(self)
2692 The built-in function :func:`int` falls back to :meth:`__trunc__` if neither
/third_party/python/Misc/
DHISTORY152 __bytes__, __trunc__, and __float__ returning instances of subclasses of
4451 - Issue #17715: Fix segmentation fault from raising an exception in a __trunc__
6488 - Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
14203 - In the math module, correctly lookup __trunc__, __ceil__, and __floor__ as
15279 to an integer. Only the __int__ and __trunc__ slots are examined.
16781 __floor__ and __trunc__, to give support for round, math.ceil,