3 ms·
Really difficult to track are issues caused by things like the map function now returning an iterator object. I.e. the content of the iterator is empty on secon
by wedesoft 7y ago
Really difficult to track are issues caused by things like the map function now returning an iterator object. I.e. the content of the iterator is empty on second use.
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x = map(lambda v: v + 1, [1, 2, 3])
>>> list(x)
[2, 3, 4]
>>> list(x)
[]