Collection Interface ABCs

collections.abc.Hashable

Objects with a non-None hash implementation. Recognition does not guarantee every instance can be hashed successfully (e.g. a tuple containing a list).

Formal Syntax & Structure

python syntaxpython
collections.abc.Hashable

Return Value

type

Abstract base class object representing the described interface; use it for recognition or inheritance.

Working Example

Example Snippetpython
import collections.abcprint(isinstance((1,2),collections.abc.Hashable))
Python Reference