Home
last modified time | relevance | path

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

/external/python/cpython2/Lib/test/
Dtest_hash.py14 from collections import Hashable
116 self.assertIsInstance(obj, Hashable)
120 self.assertNotIsInstance(obj, Hashable)
Dtest_collections.py16 from collections import Hashable, Iterable, Iterator
341 self.assertNotIsInstance(x, Hashable)
342 self.assertFalse(issubclass(type(x), Hashable), repr(type(x)))
351 self.assertIsInstance(x, Hashable)
352 self.assertTrue(issubclass(type(x), Hashable), repr(type(x)))
353 self.assertRaises(TypeError, Hashable)
355 class H(Hashable):
358 __eq__ = Hashable.__eq__ # Silence Py3k warning
361 self.validate_abstract_methods(Hashable, '__hash__')
362 self.validate_isinstance(Hashable, '__hash__')
[all …]
/external/python/cpython3/Lib/test/
Dtest_hash.py11 from collections.abc import Hashable
143 self.assertIsInstance(obj, Hashable)
147 self.assertNotIsInstance(obj, Hashable)
Dtest_collections.py23 from collections.abc import Hashable, Iterable, Iterator, Generator, Reversible
721 self.assertNotIsInstance(x, Hashable)
722 self.assertFalse(issubclass(type(x), Hashable), repr(type(x)))
731 self.assertIsInstance(x, Hashable)
732 self.assertTrue(issubclass(type(x), Hashable), repr(type(x)))
733 self.assertRaises(TypeError, Hashable)
735 class H(Hashable):
740 self.validate_abstract_methods(Hashable, '__hash__')
741 self.validate_isinstance(Hashable, '__hash__')
1191 for B in Hashable, Iterable, Iterator, Reversible, Sized, Container, Callable:
[all …]
Dtest_typing.py1892 self.assertIsInstance(42, typing.Hashable)
1893 self.assertNotIsInstance([], typing.Hashable)
Dtest_functools.py912 self.assertNotIsInstance(k, collections.abc.Hashable)
/external/python/cpython3/Doc/library/
Dcollections.abc.rst41 :class:`Hashable` ``__hash__``
101 Hashable
298 inherit from both :meth:`Set` and :meth:`Hashable`, then define
Dtyping.rst546 .. class:: Hashable
548 An alias to :class:`collections.abc.Hashable`
/external/python/cpython2/Lib/
D_abcoll.py32 class Hashable: class
41 if cls is Hashable:
/external/python/cpython3/Lib/
D_collections_abc.py84 class Hashable(metaclass=ABCMeta): class
94 if cls is Hashable:
Dtyping.py1193 Hashable = _alias(collections.abc.Hashable, ()) # Not generic. variable
/external/tensorflow/tensorflow/contrib/labeled_tensor/python/ops/
Dops.py55 tc.Union(slice, collections.Hashable, list)),
115 elif isinstance(value, collections.Hashable):
757 tc.Tuple(string_types, collections.Hashable))
Dcore.py724 tc.Union(string_types, tc.Tuple(string_types, collections.Hashable))),
/external/python/cpython2/Misc/NEWS.d/
D2.6b2.rst49 __hash__ is once again inherited by default. To allow collections.Hashable
/external/python/cpython2/Doc/library/
Dcollections.rst901 :class:`Hashable` ``__hash__``
948 Hashable
1046 inherit from both :meth:`Set` and :meth:`Hashable`, then define
/external/python/cpython2/Doc/
Dglossary.rst342 Hashable objects which compare equal must have the same hash value.
/external/python/cpython3/Doc/
Dglossary.rst496 other objects (it needs an :meth:`__eq__` method). Hashable objects which
/external/python/cpython3/Doc/reference/
Ddatamodel.rst1430 checking ``isinstance(obj, collections.abc.Hashable)``.
1440 an ``isinstance(obj, collections.abc.Hashable)`` call.
/external/python/cpython3/Doc/c-api/
Dtypeobj.rst302 ``isinstance(o, collections.Hashable)`` to correctly return ``False``. Note
/external/python/cpython2/Doc/c-api/
Dtypeobj.rst338 ``isinstance(o, collections.Hashable)`` to correctly return ``False``. Note
/external/python/cpython2/Doc/reference/
Ddatamodel.rst1440 unhashable when checking ``isinstance(obj, collections.Hashable)`` (unlike
/external/python/cpython2/Doc/whatsnew/
D2.6.rst1630 :class:`Hashable` ABC.
/external/python/cpython3/Doc/whatsnew/
D2.6.rst1634 :class:`Hashable` ABC.
/external/python/cpython3/Misc/
DHISTORY9723 - functools.cmp_to_key() now works with collections.Hashable().