diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2022-05-27 22:14:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 22:14:28 (GMT) |
commit | 70cfe56cafb2b549983f63d5d1a54654fe63c15c (patch) | |
tree | f1be9efa8ae89b95c27236a0ea6ffe63afd4ce48 /Lib/enum.py | |
parent | 711eda7dec1f62ecb2a87b274b5f6bfc2b6fbef4 (diff) | |
download | cpython-70cfe56cafb2b549983f63d5d1a54654fe63c15c.zip cpython-70cfe56cafb2b549983f63d5d1a54654fe63c15c.tar.gz cpython-70cfe56cafb2b549983f63d5d1a54654fe63c15c.tar.bz2 |
gh-93250: [Enum] Change IntEnum boundary to KEEP for backwards compatibility (GH-93302)
In previous versions of Python if an IntEnum member was combined with another integer type value using a bit-wise operation, the resulting value would still be the IntEnum type. This change restores that behavior.
Diffstat (limited to 'Lib/enum.py')
-rw-r--r-- | Lib/enum.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py index 0b97d3d..4261b11 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -1572,7 +1572,7 @@ class Flag(Enum, boundary=STRICT): __rxor__ = __xor__ -class IntFlag(int, ReprEnum, Flag, boundary=EJECT): +class IntFlag(int, ReprEnum, Flag, boundary=KEEP): """ Support for integer-based Flags """ |