]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-41816: `StrEnum.__str__` is `str.__str__` (GH-22362)
authorEthan Furman <ethan@stoneleaf.us>
Tue, 22 Sep 2020 20:00:07 +0000 (13:00 -0700)
committerGitHub <noreply@github.com>
Tue, 22 Sep 2020 20:00:07 +0000 (13:00 -0700)
commitd986d1657e1e7b50807d0633cb31d96a2d866d42
tree2565f560e2ccacd2655c9e1fcbeff429c27750de
parent947adcaa13080790167757664912c3a6c2d4c201
bpo-41816: `StrEnum.__str__` is `str.__str__` (GH-22362)

use `str.__str__` for `StrEnum` so that `str(StrEnum.member)` is the same as directly accessing the string value of the `StrEnum` member
Doc/library/enum.rst
Lib/enum.py
Lib/test/test_enum.py