[New-bugs-announce] [issue44457] Finish format() change started in issue43945

Ethan Furman report at bugs.python.org
Fri Jun 18 17:33:26 EDT 2021


New submission from Ethan Furman <ethan at stoneleaf.us>:

Finish the work started in issue43945 -- in 3.12 `format()` now uses the enum member itself instead of its `value`; e.g.:

    >>> class Color(int, Enum):
    ...     RED = 1

    >>> f"{Color.RED}"
    'RED'
    >>> f"{Color.RED:d}"
    '1'

----------
assignee: ethan.furman
messages: 396098
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: Finish format() change started in issue43945
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44457>
_______________________________________


More information about the New-bugs-announce mailing list