开发者

PEP 354-like implementation of enums

开发者 https://www.devze.com 2023-04-08 09:16 出处:网络
At one point enums were considered by the Python developers to add to the language, but the开发者_Python百科y dropped the feature. Is there some implementation of the PEP 354? — the specificatio

At one point enums were considered by the Python developers to add to the language, but the开发者_Python百科y 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消