diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -719,9 +719,9 @@ number, :class:`float`, or :class:`complex`:: hash_ = hash_float(z.real) + sys.hash_info.imag * hash_float(z.imag) # do a signed reduction modulo 2**sys.hash_info.width M = 2**(sys.hash_info.width - 1) - hash_ = (hash_ & (M - 1)) - (hash & M) + hash_ = (hash_ & (M - 1)) - (hash_ & M) if hash_ == -1: - hash_ == -2 + hash_ = -2 return hash_ .. _typeiter: