aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2022-05-23 08:56:07 -0700
committerGitHub <noreply@github.com>2022-05-23 08:56:07 -0700
commit046df59658c9f64a9f0fc909ed62e92c6c4dd668 (patch)
tree3aa963ec23a28488a995456b367441a29adbbdd5 /Lib/enum.py
parentb2694ab46997746eae7e913738623b39f6334473 (diff)
downloadcpython-046df59658c9f64a9f0fc909ed62e92c6c4dd668.tar.gz
cpython-046df59658c9f64a9f0fc909ed62e92c6c4dd668.zip
gh93107: [Enum] fix missing variable in global_str (GH-93107)
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 1df38a6f7e5..62fd5ce8fb9 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -1640,6 +1640,7 @@ def global_str(self):
use enum_name instead of class.enum_name
"""
if self._name_ is None:
+ cls_name = self.__class__.__name__
return "%s(%r)" % (cls_name, self._value_)
else:
return self._name_