[issue46242] Improve error message when creating an enum with `__call__`

2022-01-03 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28571 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30357 ___ Python tracker ___ _

[issue46242] Improve error message when creating an enum with `__call__`

2022-01-03 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now when creating a new `Enum`, we check not to extend `Enum` with existing `_member_names_`: ```python Python 3.11.0a3+ (heads/main:8d7644fa64, Dec 30 2021, 13:00:40) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" o