You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _not_given helper behaves differently than None, which even breaks compatibility with previous versions (this change was introduced in 3.12.3), when one needs to do some customization of enum metaclass.
e.g. as propsed on the stack overflow to implement enum item deprecation warning - note that this implementation stops working in 3.12.3 since the call of the parent EnumType.__call__ passes None instead of _not_given and it causes different behavior.
Note * vs. *values, which I believe even behaves differently.
The text was updated successfully, but these errors were encountered:
Documentation
See EnumType.call documentation, where the prototype is:
While in the enum.py source code there is:
The
_not_given
helper behaves differently thanNone
, which even breaks compatibility with previous versions (this change was introduced in 3.12.3), when one needs to do some customization of enum metaclass.EnumType.__call__
passesNone
instead of_not_given
and it causes different behavior.Note
*
vs.*values
, which I believe even behaves differently.The text was updated successfully, but these errors were encountered: