Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mixmastamyk
· 5y ago · 0 comments
Enums are implemented in a weird way in Python, not as part of the language but as a class that modifies itself. That said, this article is not what I expected.
Comments
[–]
comfydragon
5y ago
They're implemented using metaclasses. Metaprogramming is a part of the language.
[–]
mixmastamyk
OP
5y ago
I know that, there's a lot of magic going on due to that choice of indirect implementation.