[Python-Dev] Dataclasses and correct hashability
Ethan Furman
ethan at stoneleaf.us
Fri Feb 2 17:11:24 EST 2018
On 02/02/2018 08:09 AM, Eric V. Smith wrote:
> On 2/2/2018 10:56 AM, Elvis Pranskevichus wrote:
>> My point is exactly that there is _no_ valid use case, so (hash=True,
>> frozen=False) should not be a thing! Why are you so insistent on adding
>> a dangerous option which you admit is nearly useless?
>
> Because it's not the default, it will be documented as being an advanced use case, and it's useful in rare instances.
Personally, I don't think advanced use-cases need to be supported by flags as they can be supported by just writing the
__dunder__ methods.
--
~Ethan~
More information about the Python-Dev
mailing list