mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
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.
This commit is contained in:
parent
716ec4bfcf
commit
153b3f7530
17 changed files with 61 additions and 89 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue