[issue27877] Add recipe for "valueless" Enums to docs

2016-09-08 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue27877] Add recipe for "valueless" Enums to docs

2016-09-07 Thread Ethan Furman
Ethan Furman added the comment: Thanks for the patch, John and Emanuel! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue27877] Add recipe for "valueless" Enums to docs

2016-09-07 Thread Ethan Furman
Ethan Furman added the comment: New changeset 871bdb06c1cf by Ethan Furman in branch 'default': add recipes for pseudo-valueless enums https://hg.python.org/cpython/rev/871bdb06c1cf -- ___ Python tracker __

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread John Hagen
John Hagen added the comment: Emanuel, I like your rewording. Uploaded a new patch incorporating it. -- Added file: https://bugs.python.org/file44252/issue27877.johnthagen.02.patch ___ Python tracker

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread John Hagen
Changes by John Hagen : Removed file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch ___ Python tracker ___ ___ Python-bugs

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread Emanuel Barry
Emanuel Barry added the comment: The patch doesn't apply. I manually copy-pasted the lines in the source and generated a new one. I would probably rephrase "these values hold no meaning and should not be used" into "the values are not important" or something along those lines. -- nosy

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread John Hagen
John Hagen added the comment: Patch attached. -- keywords: +patch Added file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch ___ Python tracker ___ ___

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread John Hagen
John Hagen added the comment: Raymond, thanks for your consideration and input. I'll work on a small patch unless I hear from Ethan that he'd rather do it. I'm happy to defer to his expertise. I did try out None as a value just to be sure that that didn't work as it would not be a bad altern

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: After a little more thought, I think this would be a worthwhile recipe and would help communicate the notion that the value has no particular meaning. -- ___ Python tracker __

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg273815 ___ Python tracker ___ ___ Python-bugs-list mail

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: -0 I concur with OP's observation that "object() returns a new unique value while conveying that that value should not be expected to be used in any meaningful way" and that this recipe could help reinforce that notion. That said, the idiomatic way to comm

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-27 Thread John Hagen
New submission from John Hagen: Many programming languages allow the developer to define a enum without specifying values when there would be no significance to those values. Adding some kind of support in the stdlib itself was rejected due to the high degree of magic that would be needed: ht