[New-bugs-announce] [issue37739] list(filter) returns [] ???

Su Zhu report at bugs.python.org
Thu Aug 1 12:23:02 EDT 2019


New submission from Su Zhu <zhusu.china at gmail.com>:

The filter become empty after serving as an argument of list().

Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = filter(lambda x:x, [1,2,3])
>>> list(a)
[1, 2, 3]
>>> list(a)
[]

----------
components: Demos and Tools
messages: 348864
nosy: zhusu.china
priority: normal
severity: normal
status: open
title: list(filter) returns [] ???
type: behavior
versions: Python 3.6

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


More information about the New-bugs-announce mailing list