On 2015-08-04 15:26, Lukas Slebodnik wrote:
On (04/08/15 15:20), Christian Heimes wrote:
> On 2015-08-04 15:13, Lukas Slebodnik wrote:
>> ehlo,
>>
>> attached patch fixes ticket #2699
>>
>> On other places we do not require to return list by dict.keys().
>> There were patterns:
>> something in a_dictionary.keys()
>> ", ".join(a_dictionary.keys()))
>
> You don't have to call the keys() method at all. list(a_dict) gives you
> a list of keys on all versions of Python. If you need a sorted list, you
> can use sorted(a_dict). These days the keys() method is considered bad
> style.
>
Updated patch is attached.
ACK
hint:
You can use assertIsInstance() in the unit test. Python 2.7 has some
more useful test case methods, e.g. assertListEqual().
https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertI...
https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertL...