Issue 43957: [Enum] update __contains__ to return True for valid values
Created on 2021-04-27 19:11 by ethan.furman, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 25670 | merged | ethan.furman, 2021-04-27 20:04 | |
| PR 25770 | merged | pablogsal, 2021-05-01 02:07 | |
| Messages (4) | |||
|---|---|---|---|
| msg392122 - (view) | Author: Ethan Furman (ethan.furman) * ![]() |
Date: 2021-04-27 19:11 | |
In 3.12 `__contains__` will check for both members and values:
Color.RED in Color --> True
1 in Color --> True
'RED' in Color --> False
Add DeprecationWarning for now.
|
|||
| msg392127 - (view) | Author: Ethan Furman (ethan.furman) * ![]() |
Date: 2021-04-27 20:05 | |
New changeset 6bd9288b805c765ec2433f66aa4d82e05767325f by Ethan Furman in branch 'master': bpo-43957: [Enum] Deprecate ``TypeError`` from containment checks. (GH-25670) https://github.com/python/cpython/commit/6bd9288b805c765ec2433f66aa4d82e05767325f |
|||
| msg392622 - (view) | Author: Pablo Galindo Salgado (pablogsal) * ![]() |
Date: 2021-05-01 19:26 | |
New changeset 9a42d5069a4c2a531076abfb198d2be26b57216c by Pablo Galindo in branch 'master': bpo-43957: Add a missins space to the new format enum warning (#25770) https://github.com/python/cpython/commit/9a42d5069a4c2a531076abfb198d2be26b57216c |
|||
| msg392633 - (view) | Author: Pablo Galindo Salgado (pablogsal) * ![]() |
Date: 2021-05-01 20:33 | |
Ethan can we close this issue? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:44 | admin | set | github: 88123 |
| 2021-05-01 20:39:22 | ethan.furman | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2021-05-01 20:33:38 | pablogsal | set | messages: + msg392633 |
| 2021-05-01 19:26:15 | pablogsal | set | messages: + msg392622 |
| 2021-05-01 02:07:43 | pablogsal | set | nosy:
+ pablogsal pull_requests: + pull_request24463 |
| 2021-04-27 20:05:15 | ethan.furman | set | messages: + msg392127 |
| 2021-04-27 20:04:10 | ethan.furman | set | keywords:
+ patch stage: needs patch -> patch review pull_requests: + pull_request24361 |
| 2021-04-27 19:11:08 | ethan.furman | create | |
