This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients kjwcode, rhettinger
Date 2008-12-05.08:00:16
SpamBayes Score 1.2868303e-07
Marked as misclassified No
Message-id <1228464018.17.0.633376721838.issue4543@psf.upfronthosting.co.za>
In-reply-to
Content
In Py3.0, the filter() builtin returns a consumable iterator, not a list.
It's a feature, not a bug ;-)
For the behavior you want, write:
   y = list(filter(odd, x))
Or better yet, use a list comprehension:
   y = [e for e in x if odd(e)]
See the Whatsnew section of the docs for further explanation.
History
Date User Action Args
2008-12-05 08:00:18rhettingersetrecipients: + rhettinger, kjwcode
2008-12-05 08:00:18rhettingersetmessageid: <1228464018.17.0.633376721838.issue4543@psf.upfronthosting.co.za>
2008-12-05 08:00:17rhettingerlinkissue4543 messages
2008-12-05 08:00:16rhettingercreate