Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106941
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Grant Edwards <grant.b.edwards@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Enum questions. |
| Date | Wed, 13 Apr 2016 13:50:33 +0000 (UTC) |
| Lines | 29 |
| Message-ID | <mailman.72.1460555456.15650.python-list@python.org> (permalink) |
| References | <570E1B98.4080904@rece.vub.ac.be> <CAGgTfkPfcwamSgRFH9PwuVV4MGsnDwcZOD1=bS=7z+RWnEP0eg@mail.gmail.com> <nelir9$163$1@ger.gmane.org> |
| X-Trace | news.uni-berlin.de 7a9riTKZqtx488MdB+KF2wffy/4CiO8TPco2swK0F8kQ== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'value,': 0.03; 'corresponds': 0.09; 'enum': 0.09; 'iterate': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:qwest.net': 0.09; 'tab': 0.09; 'wed,': 0.15; 'iteration.': 0.16; 'missing?': 0.16; 'ordinal': 0.16; 'programmer,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'pascal': 0.22; 'seems': 0.23; 'header:User- Agent:1': 0.26; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'values': 0.28; '13,': 0.29; 'coded': 0.29; 'michael': 0.33; 'surprised': 0.33; 'important.': 0.35; 'too': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'two': 0.37; 'received:org': 0.37; 'missing': 0.37; 'data': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'today,': 0.62; 'skip:n 10': 0.62; 'between': 0.65; 'miss': 0.77; 'photo': 0.81; 'framed': 0.84; 'hunter': 0.84; 'pardon': 0.84; 'edwards': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | 67-130-15-94.dia.static.qwest.net |
| User-Agent | slrn/1.0.2 (Linux) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <nelir9$163$1@ger.gmane.org> |
| X-Mailman-Original-References | <570E1B98.4080904@rece.vub.ac.be> <CAGgTfkPfcwamSgRFH9PwuVV4MGsnDwcZOD1=bS=7z+RWnEP0eg@mail.gmail.com> |
| Xref | csiph.com comp.lang.python:106941 |
Show key headers only | View raw
On 2016-04-13, Michael Selik <michael.selik@gmail.com> wrote:
> On Wed, Apr 13, 2016, 12:14 PM Antoon Pardon <antoon.pardon@rece.vub.ac.be> wrote:
>
>> I have been looking at the enum documentation and it seems enums
>> are missing two features I rather find important.
>>
>> 1) Given an Enum value, someway to get the next/previous
>> one
>>
>> 2) Given two Enum values, iterate over the values between
>> them.
>>
>> Did I miss those in the documentation or are they really missing?
>
> An Enum corresponds to "nominal" data that is coded as a number
> simply for storage rather than meaning.
FWIW, as an old Pascal programmer, I too would have been surprised
that an "enum" is not ordinal and doesn't support a next/prev and
iteration.
As an old C programmer, not so much. :)
--
Grant Edwards grant.b.edwards Yow! Today, THREE WINOS
at from DETROIT sold me a
gmail.com framed photo of TAB HUNTER
before his MAKEOVER!
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Enum questions. Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-13 13:50 +0000
Re: Enum questions. Marko Rauhamaa <marko@pacujo.net> - 2016-04-13 17:07 +0300
Re: Enum questions. Ethan Furman <ethan@stoneleaf.us> - 2016-04-13 07:21 -0700
Re: Enum questions. Ethan Furman <ethan@stoneleaf.us> - 2016-04-13 14:13 -0700
csiph-web