Raymond Hettinger <[EMAIL PROTECTED]> added the comment: 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.
---------- nosy: +rhettinger resolution: -> invalid status: open -> closed _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4543> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com