New submission from Ethan Furman <et...@stoneleaf.us>:

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.

----------
assignee: ethan.furman
messages: 392122
nosy: ethan.furman
priority: normal
severity: normal
stage: needs patch
status: open
title: [Enum] update __contains__ to return True for valid values
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43957>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to