mirror of
https://github.com/python/cpython.git
synced 2025-11-09 01:51:26 +00:00
gh-98298, gh-74730: [Enum] update docs (GH-103163)
fix FlagBoundary statements
add warning about reloading modules and enum identity
(cherry picked from commit 5ffc1e5a21)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
This commit is contained in:
parent
823622212e
commit
cf72cc25f6
3 changed files with 34 additions and 30 deletions
|
|
@ -1302,10 +1302,10 @@ def _reduce_ex_by_global_name(self, proto):
|
|||
class FlagBoundary(StrEnum):
|
||||
"""
|
||||
control how out of range values are handled
|
||||
"strict" -> error is raised [default for Flag]
|
||||
"conform" -> extra bits are discarded
|
||||
"eject" -> lose flag status [default for IntFlag]
|
||||
"keep" -> keep flag status and all bits
|
||||
"strict" -> error is raised
|
||||
"conform" -> extra bits are discarded [default for Flag]
|
||||
"eject" -> lose flag status
|
||||
"keep" -> keep flag status and all bits [default for IntFlag]
|
||||
"""
|
||||
STRICT = auto()
|
||||
CONFORM = auto()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue