mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
gh-93250: [Enum] Change IntEnum boundary to KEEP for backwards compatibility (GH-93302) (GH-93304)
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.
(cherry picked from commit 70cfe56caf
)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
This commit is contained in:
parent
3f7abff97b
commit
647426d4fa
2 changed files with 11 additions and 3 deletions
|
@ -1575,7 +1575,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
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue