[docs] Code, test, and doc review for PEP-0435 Enum (issue 17947)

alex.gaynor at gmail.com alex.gaynor at gmail.com
Mon May 13 20:34:50 CEST 2013


http://bugs.python.org/review/17947/diff/8131/Lib/enum.py
File Lib/enum.py (right):

http://bugs.python.org/review/17947/diff/8131/Lib/enum.py#newcode355
Lib/enum.py:355: return member
On 2013/05/13 20:32:37, stoneleaf wrote:
> On 2013/05/13 19:35:53, alex wrote:
> > I would have assumed that that creating an enum from a value would
be O(1),
> not
> > O(n), is there no way we can improve this?
> 
> Sure, but it would add a bunch of complexity, and is it worth it for a
one time
> operation?

Why do you think it's a one time operation? Everytime you do something
like "turn a C errono into an enum" you go through this.

http://bugs.python.org/review/17947/


More information about the docs mailing list