gh-93820: Pickle enum.Flag by name#93891
Conversation
|
A Flag instance with multiple members is serialized like this: It looks like only the first member is reduced by name. |
|
The rest is reduced recursively. |
|
output with |
|
I think that it is okay. Enums are considered singletons (it allows to pickle them by name). It would be even better to add the This PR is not ideal:
It is a matter of the following optimizations. |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
(cherry picked from commit 5369858) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-94288 is a backport of this pull request to the 3.11 branch. |


#93820.