]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43162: [Enum] deprecate enum member.member access (GH-24486)
authorEthan Furman <ethan@stoneleaf.us>
Tue, 9 Feb 2021 01:32:38 +0000 (17:32 -0800)
committerGitHub <noreply@github.com>
Tue, 9 Feb 2021 01:32:38 +0000 (17:32 -0800)
commitd65b9033d6d092552775f6f5e41e7647100f9f2c
tree2119b986b118b3dd773d9015f1bfd00f3114bbae
parente1f77695132e814728cda982f11342a2e3c7272c
bpo-43162: [Enum] deprecate enum member.member access (GH-24486)

In 3.5 (?) a speed optimization made it possible to access members as
attributes of other members, i.e. ``Color.RED.BLUE``.  This was always
discouraged in the docs, and other recent optimizations has made that
one no longer necessary.  Because some may be relying on it anyway, it
is being deprecated in 3.10, and will be removed in 3.11.
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2021-02-08-16-27-00.bpo-43162.t-W7h3.rst [new file with mode: 0644]