Wilfred Hughes added the comment:
Note that this also affects the singledispatch library that backports
singledispatch to Python 2: https://github.com/python/typing/issues/484
--
nosy: +Wilfred.Hughes
___
Python tracker
<https://bugs.python.
Wilfred Hughes added the comment:
This bug is particularly subtle because it only applies to *long* strings.
>>> m.call_args == "f"
False
>>> m.call_args == "fo"
False
>>> m.call_args == "foo"
False
>>> m.call_args == "
Wilfred Hughes added the comment:
This caught me by surprise and I spent a while debugging due to this issue.
Isn't it reasonable that I can compare two values in Python without exceptions
being raised?
>>> (1, 2) == "foob"
False
I&
Changes by Wilfred Hughes :
--
title: Crash on comparing call_args with long strings -> mock: Crash on
comparing call_args with long strings
___
Python tracker
<http://bugs.python.org/issu
New submission from Wilfred Hughes:
What steps will reproduce the problem?
>>> from mock import Mock
>>> m = Mock()
>>> m(1, 2)
>>> m.call_args == "foob"
Traceback (most recent call last):
File "", line 1, in
File "/home/wilfre
New submission from Wilfred Hughes:
According to
https://wiki.python.org/moin/HowTo/Sorting/#Sort_Stability_and_Complex_Sorts
and Alex Martelli: http://stackoverflow.com/q/1915376/509706, Python's sorted()
is stable. It would be great to update the docs for sorted() to state