Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个 protobuf
enum Color { RED = 0; GREEN = 1; BLUE = 2; };
如何从 Python 中获取所有已定义值和/或名称的列表?
枚举就像python中的字典,
您将从中获取键(名称)dict.keys()和值dict.values()。
dict.keys()
dict.values()