Showing content from http://mail.python.org/pipermail/python-dev/attachments/20160217/d64c7271/attachment.html below:
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 02/17/2016 08:49 AM, Chris Angelico
wrote:<br>
</div>
<blockquote
cite="mid:CAPTjJmpdJUV0HwKa=Psw=jJmUDQ_eWrKTnVghtV_E3RWPZasGA@mail.gmail.com"
type="cite">
<pre wrap="">On Thu, Feb 18, 2016 at 12:29 AM, Larry Hastings <a class="moz-txt-link-rfc2396E" href="mailto:larry@hastings.org"><larry@hastings.org></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">int objects have their own hash algorithm, built in to long_hash() in
Objects/longobject.c. The hash of an int is the value of the int, unless
it's -1 or doesn't fit into the native type.
</pre>
</blockquote>
<pre wrap="">
Can someone elaborate on this special case, please? I can see the code
there, but there's no comment. Is there some value in not hashing to
-1?
</pre>
</blockquote>
<br>
Returning -1 indicates an error / exception. So hash functions
never return -1 as a hash value.<br>
<br>
<br>
<i>/arry</i><br>
</body>
</html>
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