[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: Thank you for your contribution, @iomintz, but I'm not going to accept this change. I don't think it improves the clarity of the code. And I realize this is wholly a subjective decision, and others may disagree. But to me, looking at the table it's clear

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Eric. The original code is preferable. -- nosy: +rhettinger ___ Python tracker ___

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: I don't see that as an improvement, especially when the goal is to not change any functionality. But maybe I'm just used to truth tables. To me, the truth table makes it clear that each case is handled correctly. -- assignee: -> eric.smith nosy:

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Io Mintz
New submission from Io Mintz : The dataclasses._hash_action table is currently a bit hard to read. It could be generated once from the if-else tree written in https://bugs.python.org/issue32929#msg312829 instead, which would both be easier to read and easier to maintain, while still