[issue35043] functools.reduce doesn't work properly with itertools.chain

Vasantha Ganesh Kanniappan report at bugs.python.org
Mon Oct 22 07:49:59 EDT 2018


New submission from Vasantha Ganesh Kanniappan <vasantha.ganesh at soroco.com>:

I'm facing this issue in python 3.6.5

How to reproduce:

my_list = [[1, 2], [3, 4]]
a = reduce(itertools.chain, my_list)

The output of `a' is [1, 2, 3, 4] as expected, but now 
my_list is [[1, 2, 3, 4], [3, 4]]

----------
components: Library (Lib)
messages: 328248
nosy: Vasantha Ganesh Kanniappan
priority: normal
severity: normal
status: open
title: functools.reduce doesn't work properly with itertools.chain
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35043>
_______________________________________


More information about the Python-bugs-list mailing list