Home
last modified time | relevance | path

Searched refs:__bool__ (Results 1 – 25 of 67) sorted by relevance

123

/third_party/mindspore/mindspore/ops/composite/multitype_ops/
Dlogic_not_impl.py36 return F.bool_not(x.__bool__())
49 return F.bool_not(x.__bool__())
50 return F.logical_not(x.__bool__())
64 return F.bool_not(x.__bool__())
78 return F.bool_not(x.__bool__())
Dlogical_or_impl.py37 return F.bool_or(x.__bool__(), y.__bool__())
Dlogical_and_impl.py37 return F.bool_and(x.__bool__(), y.__bool__())
/third_party/python/Lib/test/
Dtest_bool.py291 def __bool__(self): member in BoolTest.test_convert_to_bool.Foo
296 def __bool__(self): member in BoolTest.test_convert_to_bool.Bar
301 def __bool__(self): member in BoolTest.test_convert_to_bool.Baz
307 def __bool__(self): member in BoolTest.test_convert_to_bool.Spam
337 __bool__ = None variable in BoolTest.test_blocked.A
343 __bool__ = None variable in BoolTest.test_blocked.B
360 def __bool__(self): member in BoolTest.test_bool_called_at_least_once.X
Dtest_dynamicclassattribute.py160 def __bool__(self): member in PropertyTests.test_property___isabstractmethod__descriptor.NotBool
162 __len__ = __bool__
Dtest_property.py143 def __bool__(self): member in PropertyTests.test_property___isabstractmethod__descriptor.NotBool
145 __len__ = __bool__
Dtest_richcmp.py53 def __bool__(self): member in Vector
214 def __bool__(self): member in MiscTest.test_not.Bad
Dtest_abc.py219 def __bool__(self): member in test_factory.TestABC.test_descriptors_with_abstractmethod.NotBool
221 __len__ = __bool__
Dtest_class.py470 __bool__ = __int__ variable in ClassTests.testBadTypeReturned.BadTypeClass
/third_party/python/Doc/library/
Dtimeit.rst309 $ python -m timeit 'try:' ' str.__bool__' 'except AttributeError:' ' pass'
311 $ python -m timeit 'if hasattr(str, "__bool__"): pass'
314 $ python -m timeit 'try:' ' int.__bool__' 'except AttributeError:' ' pass'
316 $ python -m timeit 'if hasattr(int, "__bool__"): pass'
325 ... str.__bool__
331 >>> s = "if hasattr(str, '__bool__'): pass"
338 ... int.__bool__
344 >>> s = "if hasattr(int, '__bool__'): pass"
/third_party/skia/third_party/externals/jinja2/
Druntime.py823 __bool__ = __nonzero__ variable in Undefined
907 def __bool__(self): member in make_logging_undefined.LoggingUndefined
908 rv = base.__bool__(self)
1001 ) = __eq__ = __ne__ = __bool__ = __hash__ = Undefined._fail_with_undefined_error
Dlexer.py339 def __bool__(self): member in TokenStream
342 __nonzero__ = __bool__ # py2
/third_party/node/tools/inspector_protocol/jinja2/
Druntime.py671 __bool__ = __nonzero__ variable in Undefined
750 def __bool__(self): member in make_logging_undefined.LoggingUndefined
751 rv = base.__bool__(self)
807 __ne__ = __bool__ = __hash__ = \
Dlexer.py315 def __bool__(self): member in TokenStream
317 __nonzero__ = __bool__ # py2
/third_party/jinja2/
Druntime.py823 __bool__ = __nonzero__ variable in Undefined
907 def __bool__(self): member in make_logging_undefined.LoggingUndefined
908 rv = base.__bool__(self)
1001 ) = __eq__ = __ne__ = __bool__ = __hash__ = Undefined._fail_with_undefined_error
Dlexer.py339 def __bool__(self): member in TokenStream
342 __nonzero__ = __bool__ # py2
/third_party/python/Lib/test/test_json/
Dtest_speedups.py5 def __bool__(self): member in BadBool
/third_party/littlefs/scripts/
Dreadmdir.py146 def __bool__(self): member in Tag
231 def __bool__(self): member in MetadataPair
/third_party/python/Lib/
Dgraphlib.py146 def __bool__(self): member in TopologicalSorter
Dnumbers.py49 def __bool__(self): member in Complex
Denum.py353 def __bool__(self): member in EnumMeta
905 def __bool__(self): member in Flag
Dfractions.py729 def __bool__(a): member in Fraction
/third_party/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/
Dcommon.pyx.pxi57 def __bool__(self): member in _EOF
/third_party/python/Lib/test/test_importlib/
Dtest_util.py210 def __bool__(self): return False member in ModuleForLoaderTests.test_false_module.FalseModule
616 def __bool__(self): raise RuntimeError member in PEP3147Tests.test_cache_from_source_override.Bearish
/third_party/boost/tools/build/test/
DTestCmd.py180 def __bool__(self): member in MatchError

123