Issue 33134: dataclasses: use function dispatch instead of multiple tests for adding hash (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/77315
classification
Title: | dataclasses: use function dispatch instead of multiple tests for adding __hash__ | ||
---|---|---|---|
Type: | Stage: | resolved | |
Components: | Library (Lib) | Versions: | Python 3.8, Python 3.7 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | eric.smith | Nosy List: | eric.smith, miss-islington, rhettinger |
Priority: | normal | Keywords: | patch |
Created on 2018-03-24 21:11 by eric.smith, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 6222 | merged | eric.smith,2018-03-24 23:34 | |
PR 6224 | merged | miss-islington,2018-03-25 02:11 |
Messages (4) | ||
---|---|---|
msg314385 - (view) | Author: Eric V. Smith (eric.smith) * ![]() |
Date: 2018-03-24 21:11 |
There's already a table lookup for what action to take when adding __hash__. Change it to a function dispatch table, instead of using strings and testing them. | ||
msg314389 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2018-03-24 23:01 |
+1 | ||
msg314390 - (view) | Author: Eric V. Smith (eric.smith) * ![]() |
Date: 2018-03-25 02:10 |
New changeset 01d618c5606a239b03ad1269541eddb6e724775d by Eric V. Smith in branch 'master': bpo-33134: dataclasses: use function dispatch table for hash, instead of a string lookup which then is tested with if tests. (GH-6222) https://github.com/python/cpython/commit/01d618c5606a239b03ad1269541eddb6e724775d | ||
msg314391 - (view) | Author: miss-islington (miss-islington) | Date: 2018-03-25 02:31 |
New changeset 9989efbb653e8cbd08e51b4d79d094605c8b23b8 by Miss Islington (bot) in branch '3.7': bpo-33134: dataclasses: use function dispatch table for hash, instead of a string lookup which then is tested with if tests. (GH-6222) https://github.com/python/cpython/commit/9989efbb653e8cbd08e51b4d79d094605c8b23b8 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:59 | admin | set | github: 77315 |
2018-03-25 02:32:58 | eric.smith | set | status: open -> closedresolution: fixedstage: patch review -> resolved |
2018-03-25 02:31:31 | miss-islington | set | nosy: + miss-islingtonmessages: + |
2018-03-25 02:11:32 | miss-islington | set | pull_requests: + <pull%5Frequest5965> |
2018-03-25 02:10:17 | eric.smith | set | messages: + |
2018-03-24 23:34:33 | eric.smith | set | keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest5963> |
2018-03-24 23:01:23 | rhettinger | set | nosy: + rhettingermessages: + |
2018-03-24 21:11:21 | eric.smith | create |