[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as (original) (raw)
Glyph glyph at twistedmatrix.com
Tue Feb 26 00:17:06 CET 2013
- Previous message: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as
- Next message: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Feb 25, 2013, at 12:32 PM, Barry Warsaw <barry at python.org> wrote:
Dumb question, but are flufl.enums ordered? That's also an important use case. Kind of. Ordered comparisons are explicitly not supported, but iteration over the Enum is guaranteed to be returned in int-value order.
Sorry to jump in to a random leaf of this thread, but there is such a barrage here I cannot find the beginning :).
I can see in <http://www.python.org/dev/peps/pep-0435/#acknowledgments> that Twisted is mentioned; it should probably reference <https://twistedmatrix.com/documents/current/api/twisted.python.constants.html> and <https://twistedmatrix.com/documents/current/core/howto/constants.html> since we actually implemented a thing as well.
(You can order constants by sorting them; off the top of my head, NamedConstant, ValueConstant, and FlagConstant all probably behave differently.)
-g -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130225/b166c972/attachment.html>
- Previous message: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as
- Next message: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]