]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Improve `hash()` builtin docstring with caveats. (GH-125229)
authorGregory P. Smith <68491+gpshead@users.noreply.github.com>
Fri, 24 Apr 2026 16:36:46 +0000 (09:36 -0700)
committerGitHub <noreply@github.com>
Fri, 24 Apr 2026 16:36:46 +0000 (16:36 +0000)
commit665b7dfcfa240e02760f58bed5ca29ec01d028e6
tree07c5c0b96e9bb73d2efa2311a3bc76917d7815ea
parent618b726d68ccd7ae933ced615fd384d62a42ac51
Improve  `hash()` builtin docstring with caveats. (GH-125229)

Improve  `hash()` builtin docstring with caveats.

Mention its return type and that the value can be expected to change between
processes (hash randomization).

Why? The `hash` builtin gets reached for and used by a lot of people whether it
is the right tool or not. IDEs surface docstrings and people use pydoc and
`help(hash)`.
Python/bltinmodule.c
Python/clinic/bltinmodule.c.h