[issue34082] EnumMeta.__new__ should use enum_class.__new__
Pav
report at bugs.python.org
Tue Jul 10 05:43:46 EDT 2018
New submission from Pav <rootsumsquared at gmail.com>:
```python
class Foo:
pass
class Works(str, Foo, Enum):
BAR = 'baz'
class Fails(Foo, str, Enum):
BAR = 'baz'
```
`Fails` fails to be created with an error:
`TypeError: object.__new__(Fails) is not safe, use Fails.__new__()`
See https://github.com/python/cpython/blob/e57f91a0f0d5700ec466c9dd0fd2d2b5323a5e76/Lib/enum.py#L205
----------
components: Library (Lib)
messages: 321370
nosy: rs2
priority: normal
severity: normal
status: open
title: EnumMeta.__new__ should use enum_class.__new__
type: behavior
versions: Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34082>
_______________________________________
More information about the Python-bugs-list
mailing list