How do we do enumerated types work in Python? Well, there is no enum keyword as such but there are many ways to get the same effect.
red,green,blue=range(3)
You can also isolate your enums in a class. e.g.
class Colors:
red,green,blue=range(3)
Colors.red yields 0 and dir(Colors) yields meaningful results.
Useful for programming a finite state machine.
The Helm Package Manager for Kubernetes
6 days ago
No comments:
Post a Comment