src/pylib/builtins/pyhashes

Source   Edit  

Procs

proc hash(x: float): int {....raises: [], tags: [], forbids: [].}
Warning: this uses std/hashes algorithm, which differs from CPython's. Also, a==b <=> hash(a) == hash(b), where a, b are of different types, is not guaranteed.
Source   Edit  
proc hash(x: int): int {....raises: [], tags: [], forbids: [].}
Warning: this uses std/hashes algorithm, which differs from CPython's. Also, a==b <=> hash(a) == hash(b), where a, b are of different types, is not guaranteed.
Source   Edit  
proc hash(x: proc): int
Warning: this uses std/hashes algorithm, which differs from CPython's. Also, a==b <=> hash(a) == hash(b), where a, b are of different types, is not guaranteed.
Source   Edit  
proc hash(x: PyDict): int {.error: "TypeError: unhashable type: \'dict\'".}
Source   Edit  
proc hash(x: PyList): int {.error: "TypeError: unhashable type: \'list\'".}
Source   Edit  
proc hash(x: PySet): int {.error: "TypeError: unhashable type: \'set\'".}
Source   Edit  
proc hash(x: PyStr | PyBytes): int
Warning: this uses std/hashes algorithm, which differs from CPython's. Also, a==b <=> hash(a) == hash(b), where a, b are of different types, is not guaranteed.
Source   Edit  
proc hash(x: PyTComplex): int
Warning: this uses std/hashes algorithm, which differs from CPython's. Also, a==b <=> hash(a) == hash(b), where a, b are of different types, is not guaranteed.
Source   Edit  
proc hash(x: tuple): int
Warning: this uses std/hashes algorithm, which differs from CPython's. Also, a==b <=> hash(a) == hash(b), where a, b are of different types, is not guaranteed.
Source   Edit