cPickle.dumps differs from Pickle.dumps; looks like a bug.
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Wed May 16 18:36:01 EDT 2007
In <mailman.7772.1179354295.32031.python-list at python.org>, Daniel Nogradi
wrote:
> The OP was not comparing identity but equality. So it looks like a
> real bug, I think the following should be True for any function f:
>
> if a == b: f(a) == f(b)
>
> or not?
In [74]: def f(x):
....: return x / 2
....:
In [75]: a = 5
In [76]: b = 5.0
In [77]: a == b
Out[77]: True
In [78]: f(a) == f(b)
Out[78]: False
And `f()` doesn't even use something like `random()` or `time()` here. ;-)
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list