Message312829
if unsafe_hash:
# If there's already a __hash__, raise TypeError, otherwise add __hash__.
if has_explicit_hash:
hash_action = 'exception'
else:
hash_action = 'add'
else:
# unsafe_hash is False (the default).
if has_explicit_hash:
# There's already a __hash__, don't overwrite it.
hash_action = ''
else:
if eq and frozen:
# It's frozen and we added __eq__, generate __hash__.
hash_action = 'add'
elif eq and not frozen:
# It's not frozen but has __eq__, make it unhashable.
# This is the default if no params to @dataclass.
hash_action = 'none'
else:
# There's no __eq__, use the base class __hash__.
hash_action = '' |
|
Date |
User |
Action |
Args |
2018-02-25 18:01:09 | eric.smith | set | recipients:
+ eric.smith, gvanrossum, ned.deily, steven.daprano |
2018-02-25 18:01:09 | eric.smith | set | messageid: <1519581669.21.0.467229070634.issue32929@psf.upfronthosting.co.za> |
2018-02-25 18:01:09 | eric.smith | link | issue32929 messages |
2018-02-25 18:01:09 | eric.smith | create | |
|