summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-06 09:02:37 (GMT)
committerGitHub <noreply@github.com>2024-05-06 09:02:37 (GMT)
commit153b3f75306b5d26e29ea157105d0fdc247ef853 (patch)
treef73ede56af175d27698ef56bec21073f98889bbc /Lib/enum.py
parent716ec4bfcf1a564db9936122c442baa99f9c4a8c (diff)
downloadcpython-153b3f75306b5d26e29ea157105d0fdc247ef853.zip
cpython-153b3f75306b5d26e29ea157105d0fdc247ef853.tar.gz
cpython-153b3f75306b5d26e29ea157105d0fdc247ef853.tar.bz2
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/enum.py')
-rw-r--r--Lib/enum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 98a49ea..5485306 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -2035,7 +2035,7 @@ def _test_simple_enum(checked_enum, simple_enum):
)
for key in set(checked_keys + simple_keys):
if key in ('__module__', '_member_map_', '_value2member_map_', '__doc__',
- '__static_attributes__'):
+ '__static_attributes__', '__firstlineno__'):
# keys known to be different, or very long
continue
elif key in member_names: