[New-bugs-announce] [issue38375] Enum lookup fails for callable values
Massimo
report at bugs.python.org
Sat Oct 5 07:56:36 EDT 2019
New submission from Massimo <massimo at typish.io>:
```
from enum import Enum
class T(Enum):
TEST = 1
print(T["TEST"])
class S(Enum):
TEST = lambda a: a
print(S["TEST"])
```
fails with `KeyError: 'TEST'` on the last line.
----------
components: Interpreter Core
messages: 354003
nosy: typish
priority: normal
severity: normal
status: open
title: Enum lookup fails for callable values
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38375>
_______________________________________
More information about the New-bugs-announce
mailing list