-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python-stdlib/enum/enum.py: Add Enum class. #980
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
Usage example::
Output is::
|
Thanks for the contribution, this looks pretty good! Did you implement this from scratch, or copy parts from CPython's implementation? I'm just wondering about licensing and copyright. Can you please add the test to the CI, in |
I just saw CPython Enum. It looks like incredible magic. :-) |
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
That doesn't really answer the question. Did you copy this implementation from CPython? Also, please make sure the CI all passes, there's currently a failure. |
| Did you implement this from scratch, or copy parts from CPython's implementation? No, I didn't use CPython implementation. It was inspired by @shariltumin Dot class from the Way to use dot notation to refer to states in a state machine #15694 |
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
Should I squash commits? |
Docs in:
docs/library/enum.rst: Add Enum class. #16842
Usage example:
Output is:
EDITED:
Inspired by @shariltumin Dot class from the Way to use dot notation to refer to states in a state machine #15694
and @njourdane enum() func from the Request for package: micropython-enum #269