From 153b3f75306b5d26e29ea157105d0fdc247ef853 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 6 May 2024 12:02:37 +0300 Subject: 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. --- Lib/pydoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/pydoc.py') 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 -- cgit v1.2.3