On Sat, Jan 30, 2010 at 4:56 AM, spir wrote:
> I'm surprised of this, for this should create as many indexes (in the
> underlying array actually holding the values) as there are integer keys. With
> possibly huge holes in the array. Actually, there will certainly be a
> predefined number of in
spir wrote:
On Fri, 29 Jan 2010 08:23:37 -0800
Emile van Sebille wrote:
So, how does python do this?
Start here...
http://effbot.org/zone/python-hash.htm
Great, thank you!
From the above pointed page:
For ordinary integers, the hash value is simply the integer itself
On Fri, 29 Jan 2010 08:23:37 -0800
Emile van Sebille wrote:
> > So, how does python do this?
> >
>
> Start here...
>
> http://effbot.org/zone/python-hash.htm
Great, thank you!
From the above pointed page:
===
For ordinary integers, the hash value is simply the integer itself (unless it’
On Fri, Jan 29, 2010 at 1:20 PM, Rich Lovely wrote:
> I've played with this a little. The following class was quite handy for this:
>
> class BrokenHash(object):
> def __init__(self, hashval):
> self.hashval = hashval
> def __hash__(self):
> return self.hashval
>
> It basical
On 29 January 2010 16:54, Kent Johnson wrote:
> On Fri, Jan 29, 2010 at 8:03 AM, spir wrote:
>
>> I recently discovered that Lua uses the data's address (read: id) as input
>> to the hash func. This allows Lua tables (a kind of more versatile
>> associative array) to use _anything_ as key, sinc
On Fri, Jan 29, 2010 at 8:03 AM, spir wrote:
> I recently discovered that Lua uses the data's address (read: id) as input to
> the hash func. This allows Lua tables (a kind of more versatile associative
> array) to use _anything_ as key, since the id is guaranteed not to change,
> per definiti
On 1/29/2010 5:03 AM spir said...
Hello,
What actually is hashed when a data item is used a dict key? If possible, I
would also like some clues on the method used to produce the hash value. (Maybe
a pointer to the the relevant part of the python source, if clear and/or
commented.)
The reason
Hello,
What actually is hashed when a data item is used a dict key? If possible, I
would also like some clues on the method used to produce the hash value. (Maybe
a pointer to the the relevant part of the python source, if clear and/or
commented.)
The reason why I ask is the well known limitat