From: Dong-hee Na Date: Sat, 28 Jan 2023 02:08:08 +0000 (+0900) Subject: gh-101341: Remove unncessary enum._power_of_two function (gh-101342) X-Git-Tag: v3.12.0a5~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cef9c0f92720f6810be1c74e00f611acb4b8b1e;p=thirdparty%2FPython%2Fcpython.git gh-101341: Remove unncessary enum._power_of_two function (gh-101342) --- diff --git a/Lib/enum.py b/Lib/enum.py index 4658393d756e..adb61519abe9 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -1565,11 +1565,6 @@ def unique(enumeration): (enumeration, alias_details)) return enumeration -def _power_of_two(value): - if value < 1: - return False - return value == 2 ** _high_bit(value) - def _dataclass_repr(self): dcf = self.__dataclass_fields__ return ', '.join(