Commit 87196da
committed
Merge main into PR 125229; address review feedback on hash() docstring
Merges current upstream main into the branch (the PR had gone stale since
Oct 2024) and rewords the hash() builtin docstring to incorporate review
comments from @JelleZijlstra, @ncoghlan, @nedbat, and others:
- Drop "within this process" from the first sentence (Jelle, ncoghlan):
the process caveat is still stated plainly in the body, so the first-line
qualifier is redundant.
- Drop the "dict and set hash tables" sentence (Jelle, ncoghlan):
implementation details of built-in containers don't belong in the user-
facing docstring for hash().
- Add the "Not all objects are hashable; ... raises TypeError" note
(Jelle's suggestion, phrasing informed by ncoghlan's rewrite).
- Keep the original "equal => same hash, but not the reverse" formulation,
which is what the Python data model documents.
- Do not add a cryptographic warning (sobolevn raised the question but also
flagged that such warnings can encourage misuse).
https://claude.ai/code/session_01UumhMLqHB8fqUuNWsC8RCeFile tree
3,838 files changed
+596170
-201719
lines changed- .azure-pipelines
- .devcontainer
- wasi
- .github
- ISSUE_TEMPLATE
- workflows
- .well-known
- Android
- testbed
- .idea/inspectionProfiles
- app
- src
- androidTest/java/org/python/testbed
- main
- c
- java/org/python/testbed
- python
- gradle/wrapper
- Apple
- iOS
- Resources
- bin
- testbed
- Python.xcframework
- build
- ios-arm64_x86_64-simulator
- ios-arm64
- TestbedTests
- iOSTestbed.xcodeproj
- iOSTestbed
- Assets.xcassets
- AccentColor.colorset
- AppIcon.appiconset
- Base.lproj
- app_packages
- app
- Doc
- _static
- c-api
- data
- deprecations
- extending
- faq
- howto
- includes
- capi-extension
- newtypes
- installing
- library
- reference
- tools
- extensions
- lexers
- static
- templates
- tutorial
- using
- whatsnew
- Grammar
- Include
- cpython
- internal
- mimalloc/mimalloc
- InternalDocs
- images
- Lib
- _pyrepl
- asyncio
- collections
- compression
- _common
- zstd
- concurrent
- futures
- interpreters
- ctypes
- macholib
- curses
- dbm
- email
- mime
- encodings
- ensurepip
- _bundled
- html
- http
- idlelib
- Icons
- idle_test
- importlib
- metadata
- resources
- json
- logging
- multiprocessing
- dummy
- pathlib
- profiling
- sampling
- _assets
- _flamegraph_assets
- _heatmap_assets
- _vendor
- d3-flame-graph/4.1.3
- d3/7.8.5
- live_collector
- tracing
- pydoc_data
- re
- sqlite3
- string
- sysconfig
- test
- audit_test_data
- libregrtest
- mathdata
- subprocessdata
- support
- _hypothesis_stubs
- interpreters
- test_ast
- data
- test_asyncio
- test_capi
- test_cext
- test_concurrent_futures
- test_cppext
- test_ctypes
- test_dataclasses
- test_doctest
- test_email
- data
- test_free_threading
- test_future_stmt
- test_gdb
- test_importlib
- builtin
- extension
- frozen
- import_
- metadata
- namespace_pkgs/foo
- resources
- source
- test_import
- data
- unwritable
- test_inspect
- test_interpreters
- test_io
- test_json
- test_lazy_import
- data
- badsyntax
- pkg
- test_module
- test_multiprocessing_forkserver
- test_os
- test_pathlib
- support
- test_peg_generator
- test_profiling
- test_sampling_profiler
- test_pydoc
- test_pyrepl
- test_sqlite3
- test_string
- test_tkinter
- test_tomllib
- data/valid
- dates-and-times
- inline-table
- multiline-basic-str
- test_tools
- i18n_data
- msgfmt_data
- test_ttk
- test_unittest
- namespace_test_pkg
- bar
- noop
- no2
- testmock
- test_warnings
- data
- _path
- test_zoneinfo
- data
- translationdata
- argparse
- getopt
- optparse
- typinganndata
- partialexecution
- wheeldata
- tkinter
- tomllib
- turtledemo
- unittest
- urllib
- venv
- scripts
- common
- nt
- posix
- wsgiref
- xmlrpc
- xml
- dom
- etree
- sax
- zipfile
- _path
- zoneinfo
- Mac
- BuildScript
- resources
- scripts
- PythonLauncher
- Resources
- Misc
- NEWS.d
- next
- Build
- C API
- C_API
- Core and Builtins
- Core_and_Builtins
- Documentation
- IDLE
- Library
- Security
- Tests
- Tools-Demos
- Windows
- macOS
- mypy
- Modules
- _ctypes
- clinic
- _decimal
- clinic
- libmpdec
- tests
- _hacl
- include/krml
- internal
- internal
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
3,838 files changed
+596170
-201719
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| 86 | + | |
83 | 87 | | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
| 97 | + | |
| 98 | + | |
90 | 99 | | |
91 | 100 | | |
92 | 101 | | |
| |||
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| 114 | + | |
0 commit comments