문제

At one point enums were considered by the Python developers to add to the language, but they dropped the feature. Is there some implementation of the PEP 354? — the specification seems pretty robust.

도움이 되었습니까?

해결책

http://pypi.python.org/pypi/enum/ is the implementation of this PEP.

다른 팁

The PyPI package enum provides a Python implementation of the data types described in this PEP.

Also, an implementation by Barry Warsaw.

Finally, PEP 435 has been accepted for Python 3.4, the backport is enum34, and the advanced version is aenum.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top