[Zope-dev] zope.keyreference hashes vs. 32/64bit

2010-08-28 Thread Hanno Schlichting
Hi. I've recently stumbled on some at least to me unexpected behavior with zope.keyreference. For a persistent object it generates a unique key using: hash((database_name, oid)) where hash is Python's built-in hash function. Reading the documentation I assumed that a keyreference for the same

Re: [Zope-dev] zope.keyreference hashes vs. 32/64bit

2010-08-28 Thread Jim Fulton
On Sat, Aug 28, 2010 at 12:17 PM, Hanno Schlichting ha...@hannosch.eu wrote: Hi. I've recently stumbled on some at least to me unexpected behavior with zope.keyreference. Specifically, zope.keyreference.persistent, I assume. For a persistent object it generates a unique key using:

Re: [Zope-dev] zope.keyreference hashes vs. 32/64bit

2010-08-28 Thread Hanno Schlichting
Hi. On Sat, Aug 28, 2010 at 8:47 PM, Jim Fulton j...@zope.com wrote: On Sat, Aug 28, 2010 at 12:17 PM, Hanno Schlichting ha...@hannosch.eu wrote: I've recently stumbled on some at least to me unexpected behavior with zope.keyreference. Specifically, zope.keyreference.persistent, I assume.

Re: [Zope-dev] zope.keyreference hashes vs. 32/64bit

2010-08-28 Thread Jim Fulton
On Sat, Aug 28, 2010 at 3:12 PM, Hanno Schlichting ha...@hannosch.eu wrote: Hi. On Sat, Aug 28, 2010 at 8:47 PM, Jim Fulton j...@zope.com wrote: On Sat, Aug 28, 2010 at 12:17 PM, Hanno Schlichting ha...@hannosch.eu wrote: I've recently stumbled on some at least to me unexpected behavior