aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/clinic/codeobject.c.h
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2023-08-31 12:45:12 -0700
committerGitHub <noreply@github.com>2023-08-31 12:45:12 -0700
commitd48760b2f1e28dd3c1a35721939f400a8ab619b8 (patch)
treecf8dbe4f3bf0019e5359918e92fee16827a6b93a /Objects/clinic/codeobject.c.h
parent13a00078b81776b23b0b6add69b848382240d1f2 (diff)
downloadcpython-d48760b2f1e28dd3c1a35721939f400a8ab619b8.tar.gz
cpython-d48760b2f1e28dd3c1a35721939f400a8ab619b8.zip
gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704)
When overriding the `__new__` method of an enum, the underlying data type should be created directly; i.e. . member = object.__new__(cls) member = int.__new__(cls, value) member = str.__new__(cls, value) Calling `super().__new__()` finds the lookup version of `Enum.__new__`, and will now raise an exception when detected.
Diffstat (limited to 'Objects/clinic/codeobject.c.h')
0 files changed, 0 insertions, 0 deletions