FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-137574: Add Support For Special Names in `help` by adqm · Pull Request #137966 · python/cpython · GitHub

Repository navigation

Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b36972d
first steps: don't show help output for dunders we've grabbed from bu…
adqm Aug 16, 2025
93ac0fa
better help for built-in help function
adqm Aug 16, 2025
0c0f04c
add __main__ and DUNDERMETHODS to help
adqm Aug 16, 2025
255b603
try to associate all dunder methods with relevant pages from datamode…
adqm Aug 16, 2025
da7f55c
show help for, e.g., __import__
adqm Aug 17, 2025
3294f92
bugfix for sequence-related dunders
adqm Aug 17, 2025
2aee131
list 'specialnames' as a special topic
adqm Aug 17, 2025
bff3522
add help for __name__
adqm Aug 18, 2025
d1959d2
change title of added reference
adqm Aug 17, 2025
1bc0227
faster check for dunder name
adqm Aug 18, 2025
4ed0e72
suggest online help as well if we can't find something
adqm Aug 18, 2025
5800535
fix bad reference (SPECIALNAMES doesn't exist)
adqm Aug 18, 2025
587740b
change help(help) output
adqm Aug 18, 2025
69265aa
clarify message when an entry is not found
adqm Aug 18, 2025
101fff3
update test cases for new message
adqm Aug 18, 2025
35b4470
revert changes to help(help); those should probably be a separate PR
adqm Aug 19, 2025
e196818
new test cases for help() about dunder methods
adqm Aug 19, 2025
d11fb77
remove extra whitespace
adqm Aug 19, 2025
2c34fba
__matmul__ shouldn't reference @ because of where help('@') currently…
adqm Aug 19, 2025
595b95c
fixes for missing dunder doctest
adqm Aug 19, 2025
0a49cfb
attempt to fix failing test case on windows
adqm Aug 19, 2025
394e401
add news blurb
adqm Aug 19, 2025
685b627
roll back changes to pydoc_data not relevant to the new topics
adqm Aug 20, 2025
376e3fb
merge
adqm Oct 12, 2026
8c16306
fixes for checking whether a string should look up special dunder help
adqm Oct 12, 2026
f6c4f8c
add sphinx reference to news entry
adqm Oct 12, 2026
8991bb2
fix typo in __set_name__ dunder
adqm Oct 12, 2026
7f92fbe
add class-customization to pydoc topics
adqm Oct 12, 2026
d419cad
what's new entry
adqm Oct 12, 2026
f3f2f4d
add symbols to html help from pydoc
adqm Oct 12, 2026
b826b60
remove duplicate customization label from Doc/using/windows.rst
adqm Oct 12, 2026
e1c7fab
Merge branch 'main' into pydoc_dunders
adqm Oct 13, 2026
58de00a
add more built-in modules to SKIP_DUNDER_HELP
adqm Oct 13, 2026
f4b6f5c
also unquote url in error page
adqm Oct 13, 2026
cac3a02
merge
adqm Oct 14, 2026
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
bugfix for sequence-related dunders
  • Loading branch information
adqm committed Aug 19, 2025
commit 3294f924e2576da5f87befae67a525e508ee85ef
5 changes: 2 additions & 3 deletions Lib/pydoc.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ def collect_dunders(symbols):
'__contains__',
]
for sd in sequence_dunders:
dunders[sd] = ('SEQUENCEMETHODS', 'SPECIALMETHODS')
dunders[sd] = ('sequence-types', 'SPECIALMETHODS')

comparison_dunders = {
'__lt__': '<',
Expand Down Expand Up @@ -2061,8 +2061,7 @@ class Helper:
'BASICMETHODS': ('customization', 'hash repr str SPECIALMETHODS'),
'ATTRIBUTEMETHODS': ('attribute-access', 'ATTRIBUTES SPECIALMETHODS'),
'CALLABLEMETHODS': ('callable-types', 'CALLS SPECIALMETHODS'),
'SEQUENCEMETHODS': ('sequence-types', 'SEQUENCES SEQUENCEMETHODS '
'SPECIALMETHODS'),
'SEQUENCEMETHODS': ('sequence-types', 'SEQUENCES SPECIALMETHODS'),
'MAPPINGMETHODS': ('sequence-types', 'MAPPINGS SPECIALMETHODS'),
'NUMBERMETHODS': ('numeric-types', 'NUMBERS AUGMENTEDASSIGNMENT '
'SPECIALMETHODS'),
Expand Down

Back | FazBrowse Home | New Git URL