Home
last modified time | relevance | path

Searched refs:__float__ (Results 1 – 25 of 42) sorted by relevance

12

/third_party/python/Lib/
Dnumbers.py159 def __float__(self): member in Real
283 def __float__(self): member in Rational
379 def __float__(self): member in Integral
/third_party/python/Doc/c-api/
Dfloat.rst48 *pyfloat* is not a Python floating point object but has a :meth:`__float__`
50 If ``__float__()`` is not defined then it falls back to :meth:`__index__`.
Dcomplex.rst133 :meth:`__float__`. If ``__float__()`` is not defined then it falls back
/third_party/python/Lib/test/
Dtest_cmath.py232 def __float__(self): member in CMathTests.test_user_object.FloatAndComplex
237 def __float__(self): member in CMathTests.test_user_object.FloatAndComplexOS
242 def __float__(self): member in CMathTests.test_user_object.JustFloat
245 def __float__(self): member in CMathTests.test_user_object.JustFloatOS
279 self.assertEqual(f(arg), f(arg.__float__()))
Dtest_float.py180 def __float__(self): member in GeneralFloatCases.test_floatconversion.Foo1
184 def __float__(self): member in GeneralFloatCases.test_floatconversion.Foo2
191 def __float__(self): member in GeneralFloatCases.test_floatconversion.Foo3
195 def __float__(self): member in GeneralFloatCases.test_floatconversion.Foo4
201 def __float__(self): member in GeneralFloatCases.test_floatconversion.FooStr
212 def __float__(self): member in GeneralFloatCases.test_floatconversion.Foo5
218 def __float__(self): member in GeneralFloatCases.test_floatconversion.F
Dtest_getargs2.py101 def __float__(self): member in Float
108 def __float__(self): member in FloatSubclass2
112 def __float__(self): member in BadFloat
116 def __float__(self): member in BadFloat2
120 def __float__(self): member in BadFloat3
Dtest_fractions.py40 def __float__(self): member in DummyFloat
78 def __float__(self): member in DummyRational
Dtest_class.py465 __float__ = __int__ variable in ClassTests.testBadTypeReturned.BadTypeClass
Dtest_binop.py67 def __float__(self): member in Rat
Dtest_complex.py454 def __float__(self): member in ComplexTest.test_constructor.float2
/third_party/python/Lib/ctypes/test/
Dtest_numbers.py110 def __float__(self): member in NumberTestCase.test_floats.FloatLike
121 def __float__(self): member in NumberTestCase.test_integers.FloatLike
/third_party/skia/third_party/externals/markupsafe/
D__init__.py222 __float__ = lambda s: float(s.obj) member in _MarkupEscapeHelper
/third_party/node/tools/inspector_protocol/markupsafe/
D__init__.py222 __float__ = lambda s: float(s.obj) member in _MarkupEscapeHelper
/third_party/markupsafe/
D__init__.py274 def __float__(self) -> float: member in _MarkupEscapeHelper
/third_party/python/Modules/_decimal/tests/
Ddeccheck.py541 def __float__(self, t): member in SkipHandler
547 __complex__ = __float__
/third_party/skia/third_party/externals/jinja2/
Druntime.py796 __float__
/third_party/node/tools/inspector_protocol/jinja2/
Druntime.py647 __float__ = __complex__ = __pow__ = __rpow__ = __sub__ = \
/third_party/jinja2/
Druntime.py796 __float__
/third_party/python/Doc/library/
Dcmath.rst12 :meth:`__complex__` or a :meth:`__float__` method: these methods are used to
Dfunctions.rst367 to :meth:`__float__`. If ``__float__()`` is not defined then it falls back
384 :meth:`__float__` are not defined.
649 ``x.__float__()``. If ``__float__()`` is not defined then it falls back
676 Falls back to :meth:`__index__` if :meth:`__float__` is not defined.
/third_party/boost/libs/python/doc/reference/
Doperators.qbk143 [[`float_(self)`][`__float__`][`double(x)`]]
/third_party/python/Misc/NEWS.d/
D3.6.0a2.rst67 warning is emitted if __float__ returns an instance of a strict subclass of
D3.10.0a2.rst174 Removed special methods ``__int__``, ``__float__``, ``__floordiv__``,
/third_party/python/Lib/unittest/test/testmock/
Dtestmock.py1874 m.__float__ = MagicMock(return_value=3.0)
1878 self.assertEqual(m.mock_calls, [call.__int__(), call.__float__()])
/third_party/python/Lib/collections/
D__init__.py1326 def __float__(self): member in UserString

12