[issue14621] Hash function is not randomized properly

2012-11-08 Thread Sasha B
Sasha B added the comment: Ruby uses the Murmur hash for some types (string & integer at least): http://murmurhash.googlepages.com/ src: http://stackoverflow.com/a/3270836/1332819 The Perl hash implementation: http://cpansearch.perl.org/src/NWCLARK/perl-5.8.8/hv.c PHP5 hash implementa

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
Sasha B added the comment: Ahh, I see. You are correct. Thanks. -- ___ Python tracker <http://bugs.python.org/issue14898> ___ ___ Python-bugs-list mailin

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
Changes by Sasha B : -- components: +Build type: -> behavior versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue14898> ___ ___ Python-

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
New submission from Sasha B : Not sure if this is predicted behaviour, but if I make a dict like: >>> x = {0: 'bar', True: 'foo'} and modify True with 1, or 0 with False: >>> x[False] = 'boo' >>> x[1] = 'far' the modification

[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Sasha B
New submission from Sasha B : If you have a look at the file 'python/Lib/json/encode.py', on line 30 it says: # Assume this produces an infinity on all machines (probably not guaranteed) INFINITY = float('1e6') FLOAT_REPR = repr Isn't float('Inf&#