aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-06 12:02:37 +0300
committerGitHub <noreply@github.com>2024-05-06 12:02:37 +0300
commit153b3f75306b5d26e29ea157105d0fdc247ef853 (patch)
treef73ede56af175d27698ef56bec21073f98889bbc /Lib/pydoc.py
parent716ec4bfcf1a564db9936122c442baa99f9c4a8c (diff)
downloadcpython-153b3f75306b5d26e29ea157105d0fdc247ef853.tar.gz
cpython-153b3f75306b5d26e29ea157105d0fdc247ef853.zip
gh-118465: Add __firstlineno__ attribute to class (GH-118475)
It is set by compiler with the line number of the first line of the class definition.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index eaaf8249b20..55ccf2152c2 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -326,7 +326,7 @@ def visiblename(name, all=None, obj=None):
'__date__', '__doc__', '__file__', '__spec__',
'__loader__', '__module__', '__name__', '__package__',
'__path__', '__qualname__', '__slots__', '__version__',
- '__static_attributes__'}:
+ '__static_attributes__', '__firstlineno__'}:
return 0
# Private names are hidden, but special names are displayed.
if name.startswith('__') and name.endswith('__'): return 1