[issue21706] Add base for enumerations (Functional API)

2014-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 713ee49ec3ba by Berker Peksag in branch 'default': Issue #21706: Add a versionchanged directive to the functional API docs. https://hg.python.org/cpython/rev/713ee49ec3ba -- ___ Python tracker

[issue21706] Add base for enumerations (Functional API)

2014-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec016ba862ba by Ethan Furman in branch 'default': Close issue21706: add 'start' parameter to functional API https://hg.python.org/cpython/rev/ec016ba862ba -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue21706] Add base for enumerations (Functional API)

2014-06-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looks sensible to me. Except for being name-only, this duplicates the api of enumerate. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21706

[issue21706] Add base for enumerations (Functional API)

2014-06-11 Thread Dmitry Korchemny
Dmitry Korchemny added the comment: I think that the situation when you want start numbering from 0 is rather common, especially when you need to define bit fields as enumeration or when you need to implement an interface with other languages (e.g., C). --

[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Dmitry Korchemny
New submission from Dmitry Korchemny: In enum module the functional API for enum creation has the following signature: Enum(value='NewEnumName', names=..., *, module='...', qualname='...', type=mixed-in class) so that the numeration always starts with 1. In some cases it is convenient to

[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21706 ___

[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Ethan Furman
Ethan Furman added the comment: That is certainly nicer than the current idiom: Animal = Enum('Animal', zip('ant bee cat dog'.split(), range(4))) -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org

[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Eli Bendersky
Eli Bendersky added the comment: Is it really worthwhile to complicate the API for the sake of providing a less flexible solution for rare cases that saves a few keystrokes? -- ___ Python tracker rep...@bugs.python.org

[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Ethan Furman
Ethan Furman added the comment: Playing devil's advocate: The issue is not so much the keystrokes saved as the improvement in reading and understanding what was intended. If you are happy with starting at 1 the idiom is easy to both write, read, and understand; but if you want some other