[issue30517] Enum does not recognize enum.auto as unique values

2017-05-31 Thread Max
Max added the comment: Ah sorry about that ... Yes, everything works fine when used properly. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker _

[issue30517] Enum does not recognize enum.auto as unique values

2017-05-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: You didn't instantiate auto; read the docs ( https://docs.python.org/3/library/enum.html#using-automatic-values ): auto is a class, you instantiate it to make instances for use. If you omit the parens, it's just a plain class, not a special value for automatic

[issue30517] Enum does not recognize enum.auto as unique values

2017-05-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue30517] Enum does not recognize enum.auto as unique values

2017-05-30 Thread Max
New submission from Max: This probably shouldn't happen: import enum class E(enum.Enum): A = enum.auto B = enum.auto x = E.B.value print(x) # print(E(x)) # E.A The first print() is kinda ok, I don't really care about which value was used by the implementatio