[Mesa-dev] [PATCH 06/26] python: Better iterate over dictionaries

2018-07-06 Thread Mathieu Bridon
In Python 2, dictionaries have 2 sets of methods to iterate over their keys and values: keys()/values()/items() and iterkeys()/itervalues()/iteritems(). The former return lists while the latter return iterators. Python 3 dropped the method which return lists, and renamed the methods returning it

Re: [Mesa-dev] [PATCH 06/26] python: Better iterate over dictionaries

2018-07-06 Thread Mathieu Bridon
On Thu, 2018-07-05 at 08:48 -0700, Dylan Baker wrote: > I've asked a couple of people who have (in the past at least) had a > hard requirement on python 2.x if moving to 3.x will be okay for > them. If it's not then we may need to do something else here. I've > used six in the past (although I know

Re: [Mesa-dev] [PATCH 06/26] python: Better iterate over dictionaries

2018-07-05 Thread Dylan Baker
I've asked a couple of people who have (in the past at least) had a hard requirement on python 2.x if moving to 3.x will be okay for them. If it's not then we may need to do something else here. I've used six in the past (although I know a lot of other pythonistas don't like six), so that would be

Re: [Mesa-dev] [PATCH 06/26] python: Better iterate over dictionaries

2018-07-05 Thread Eric Engestrom
On Thursday, 2018-07-05 15:17:37 +0200, Mathieu Bridon wrote: > In Python 2, dictionaries have 2 sets of methods to iterate over their > keys and values: keys()/values()/items() and > iterkeys()/itervalues()/iteritems(). > > The former return lists while the latter return iterators. > > Python 3

[Mesa-dev] [PATCH 06/26] python: Better iterate over dictionaries

2018-07-05 Thread Mathieu Bridon
In Python 2, dictionaries have 2 sets of methods to iterate over their keys and values: keys()/values()/items() and iterkeys()/itervalues()/iteritems(). The former return lists while the latter return iterators. Python 3 dropped the method which return lists, and renamed the methods returning it