[Python-checkins] [Enum] unchain exception property.__get__ (GH-103305)
ethanfurman
webhook-mailer at python.org
Thu Apr 6 00:30:17 EDT 2023
https://github.com/python/cpython/commit/a44568b80dfc494759d45db59423ed314bc70f9e
commit: a44568b80dfc494759d45db59423ed314bc70f9e
branch: main
author: Ethan Furman <ethan at stoneleaf.us>
committer: ethanfurman <ethan at stoneleaf.us>
date: 2023-04-05T21:30:11-07:00
summary:
[Enum] unchain exception property.__get__ (GH-103305)
files:
M Lib/enum.py
diff --git a/Lib/enum.py b/Lib/enum.py
index 0b0629cf9205..10902c4b202a 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -207,7 +207,7 @@ def __get__(self, instance, ownerclass=None):
except KeyError:
raise AttributeError(
'%r has no attribute %r' % (ownerclass, self.name)
- )
+ ) from None
else:
return self.fget(instance)
More information about the Python-checkins
mailing list