]> granicus.if.org Git - python/commit
bpo-33134: dataclasses: use function dispatch table for hash, instead of a string...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 25 Mar 2018 02:31:29 +0000 (19:31 -0700)
committerGitHub <noreply@github.com>
Sun, 25 Mar 2018 02:31:29 +0000 (19:31 -0700)
commit9989efbb653e8cbd08e51b4d79d094605c8b23b8
tree2c3a660e757d76d6de3b71fad2c08f9c0a8f946c
parent02c19a6fc08dd37a3a89cf1b9800c869c338bd3c
bpo-33134: dataclasses: use function dispatch table for hash, instead of a string lookup which then is tested with if tests. (GH-6222)

* Change _hash_action to be a function table lookup, instead of a list
of strings which is then tested with if statements.
(cherry picked from commit 01d618c5606a239b03ad1269541eddb6e724775d)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Lib/dataclasses.py
Misc/NEWS.d/next/Library/2018-03-24-19-34-26.bpo-33134.hbVeIX.rst [new file with mode: 0644]