Searched refs:__round__ (Results 1 - 12 of 12) sorted by relevance
/third_party/python/Lib/ |
H A D | numbers.py | 189 def __round__(self, ndigits=None): member in Real
|
H A D | fractions.py | 620 def __round__(self, ndigits=None): member in Fraction
|
H A D | typing.py | 2830 """An ABC with one abstract method __round__ that is covariant in its return type.""" 2835 def __round__(self, ndigits: int = 0) -> T_co: member in SupportsRound
|
H A D | _pydecimal.py | 1840 def __round__(self, n=None): member in Decimal
|
/third_party/python/Lib/unittest/test/testmock/ |
H A D | testmagicmethods.py | 284 self.assertEqual(round(mock), mock.__round__()) 310 self.assertEqual(round(mock), mock.__round__())
|
/third_party/python/Lib/test/ |
H A D | test_decimal.py | 4594 self.assertEqual(str(Decimal("9.99").__round__()), "10") 4595 self.assertEqual(str(Decimal("9.99e-5").__round__()), "0") 4596 self.assertEqual(str(Decimal("1.23456789").__round__(5)), "1.23457") 4597 self.assertEqual(str(Decimal("1.2345").__round__(10)), "1.2345000000") 4598 self.assertEqual(str(Decimal("1.2345").__round__(-10)), "0E+10") 4600 self.assertRaises(TypeError, Decimal("1.23").__round__, "5") 4601 self.assertRaises(TypeError, Decimal("1.23").__round__, 5, 8) 5164 self.assertRaises(InvalidOperation, Decimal("1.23").__round__, 5166 self.assertRaises(InvalidOperation, Decimal("1.23").__round__, 5168 self.assertRaises(InvalidOperation, Decimal("1").__round__, [all...] |
H A D | test_builtin.py | 1545 def __round__(self): member in BuiltinTest.test_round.TestRound 1557 t.__round__ = lambda *args: args
|
/third_party/python/Include/internal/ |
H A D | pycore_global_strings.h | 182 STRUCT_FOR_ID(__round__)
|
H A D | pycore_runtime_init.h | 805 INIT_ID(__round__), \
|
/third_party/python/Modules/_decimal/tests/ |
H A D | deccheck.py | 100 'special': ('__format__', '__reduce_ex__', '__round__', 'from_float', 155 BinaryRestricted = ['__round__'] 559 def __round__(self, t): member in SkipHandler 560 """Exception: Decimal('1').__round__(-100000000000000000000000000) 1068 """Iterate the __round__ method through many test cases.""" 1261 do_single('__round__', lambda: test_method('__round__', testspecs, test_round))
|
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | test_util.py | 864 def __round__(self): member in NonStandardInteger
|
/third_party/python/Python/ |
H A D | bltinmodule.c | 2325 round = _PyObject_LookupSpecial(number, &_Py_ID(__round__)); in builtin_round_impl() 2329 "type %.100s doesn't define __round__ method", in builtin_round_impl()
|
Completed in 31 milliseconds