From 046df59658c9f64a9f0fc909ed62e92c6c4dd668 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Mon, 23 May 2022 08:56:07 -0700 Subject: gh93107: [Enum] fix missing variable in global_str (GH-93107) --- Lib/enum.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Lib/enum.py') 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_ -- cgit v1.2.3