Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b921dbc

Browse filesBrowse files
committed
fix Flag to use CONFORM boundary
1 parent db39050 commit b921dbc
Copy full SHA for b921dbc

File tree

2 files changed

+2
-2
lines changed
Filter options

2 files changed

+2
-2
lines changed

‎Lib/enum.py

Copy file name to clipboardExpand all lines: Lib/enum.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ class FlagBoundary(StrEnum):
12691269
STRICT, CONFORM, EJECT, KEEP = FlagBoundary
12701270

12711271

1272-
class Flag(Enum, boundary=STRICT):
1272+
class Flag(Enum, boundary=CONFORM):
12731273
"""
12741274
Support for flags
12751275
"""

‎Lib/test/test_enum.py

Copy file name to clipboardExpand all lines: Lib/test/test_enum.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2927,7 +2927,7 @@ def test_bool(self):
29272927
self.assertEqual(bool(f.value), bool(f))
29282928

29292929
def test_boundary(self):
2930-
self.assertIs(enum.Flag._boundary_, STRICT)
2930+
self.assertIs(enum.Flag._boundary_, CONFORM)
29312931
class Iron(Flag, boundary=STRICT):
29322932
ONE = 1
29332933
TWO = 2

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.