Message319542
| Author | ethan.furman |
|---|---|
| Recipients | adelfino, barry, docs@python, eli.bendersky, ethan.furman, serhiy.storchaka |
| Date | 2018-06-14.19:55:45 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1529006145.87.0.947875510639.issue33862@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Serhiy is correct. The exact return type only needs to be ordered, and have appropriate dictionary methods such as `keys()`, `values()`, and `items()`. The reason a mappingproxy was chosen is exactly because what you just tried is illegal and/or confusing: - illegal because an Enum cannot be modified that way - confusing because the dictionary returned is only a copy of the Enum class' __dict__, and successful attempts to modify it would not change the Enum class. It is an implementation detail because the exact type of dictionary returned could change in the future. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-06-14 19:55:45 | ethan.furman | set | recipients: + ethan.furman, barry, eli.bendersky, docs@python, serhiy.storchaka, adelfino |
| 2018-06-14 19:55:45 | ethan.furman | set | messageid: <1529006145.87.0.947875510639.issue33862@psf.upfronthosting.co.za> |
| 2018-06-14 19:55:45 | ethan.furman | link | issue33862 messages |
| 2018-06-14 19:55:45 | ethan.furman | create | |