Re: [Mesa-dev] [PATCH 07/26] python: Better sort dictionary keys/values

2018-07-06 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick On 07/06/2018 03:17 AM, Mathieu Bridon wrote: > In Python 2, dict.keys() and dict.values() both return a list, which can > be sorted in two ways: > > * l.sort() modifies the list in-place; > * sorted(l) returns a new, sorted list; > > In Python 3,

[Mesa-dev] [PATCH 07/26] python: Better sort dictionary keys/values

2018-07-06 Thread Mathieu Bridon
In Python 2, dict.keys() and dict.values() both return a list, which can be sorted in two ways: * l.sort() modifies the list in-place; * sorted(l) returns a new, sorted list; In Python 3, dict.keys() and dict.values() do not return lists any more, but iterators. Iterators do not have a .sort()

Re: [Mesa-dev] [PATCH 07/26] python: Better sort dictionary keys/values

2018-07-05 Thread Eric Engestrom
On Thursday, 2018-07-05 15:17:38 +0200, Mathieu Bridon wrote: > In Python 2, dict.keys() and dict.values() both return a list, which can > be sorted in two ways: > > * l.sort() modifies the list in-place; > * sorted(l) returns a new, sorted list; > > In Python 3, dict.keys() and dict.values() do

[Mesa-dev] [PATCH 07/26] python: Better sort dictionary keys/values

2018-07-05 Thread Mathieu Bridon
In Python 2, dict.keys() and dict.values() both return a list, which can be sorted in two ways: * l.sort() modifies the list in-place; * sorted(l) returns a new, sorted list; In Python 3, dict.keys() and dict.values() do not return lists any more, but iterators. Iterators do not have a .sort()