Re: [Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-19 Thread Max Reitz
On 16.10.18 00:39, Cleber Rosa wrote: > > > On 10/15/18 10:14 AM, Max Reitz wrote: >> In Python 3, several functions now return iterators instead of lists. >> This includes range(), items(), map(), and filter(). This means that if >> we really want a list, we have to wrap those instances with li

Re: [Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-19 Thread Max Reitz
On 15.10.18 22:07, Eduardo Habkost wrote: > On Mon, Oct 15, 2018 at 04:14:49PM +0200, Max Reitz wrote: >> In Python 3, several functions now return iterators instead of lists. >> This includes range(), items(), map(), and filter(). This means that if >> we really want a list, we have to wrap those

Re: [Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-15 Thread Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote: > In Python 3, several functions now return iterators instead of lists. > This includes range(), items(), map(), and filter(). This means that if > we really want a list, we have to wrap those instances with list(). On > the other hand, sometimes we do ju

Re: [Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-15 Thread Eduardo Habkost
On Mon, Oct 15, 2018 at 04:14:49PM +0200, Max Reitz wrote: > In Python 3, several functions now return iterators instead of lists. > This includes range(), items(), map(), and filter(). This means that if > we really want a list, we have to wrap those instances with list(). On > the other hand, s

[Qemu-devel] [PATCH 5/9] iotests: Different iterator behavior in Python 3

2018-10-15 Thread Max Reitz
In Python 3, several functions now return iterators instead of lists. This includes range(), items(), map(), and filter(). This means that if we really want a list, we have to wrap those instances with list(). On the other hand, sometimes we do just want an iterator, in which case we have sometim