A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-January/151962.html below:

[Python-Dev] Is static typing still optional?

[Python-Dev] Is static typing still optional? [Python-Dev] Is static typing still optional?Eric V. Smith eric at trueblade.com
Sun Jan 28 10:45:49 EST 2018
On 1/6/2018 5:13 PM, Eric V. Smith wrote:
> On 12/10/2017 5:00 PM, Raymond Hettinger wrote:

...

>> 2) Change the default value for "hash" from "None" to "False".  This 
>> might take a little effort because there is currently an oddity where 
>> setting hash=False causes it to be hashable.  I'm pretty sure this 
>> wasn't intended ;-)
> 
> I haven't looked at this yet.

I think the hashing logic explained in 
https://bugs.python.org/issue32513#msg310830 is correct. It uses 
hash=None as the default, so that frozen=True objects are hashable, 
which they would not be if hash=False were the default. If there's some 
case there that you disagree with, I'd be interested in hearing about it.

That logic is what is currently scheduled to go in to 3.7 beta 1. I have 
not updated the PEP yet, mostly because it's so difficult to explain.

What's the case where setting hash=False causes it to be hashable? I 
don't think that was ever the case, and I hope it's not the case now.

Eric
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4