qwjqwj <q...@papayamobile.com> added the comment: Ok, I see. Thanks. However, I don't think yield should be consumed at the iterator's level. It may be more useful for the outside function to consume the yield.
For example, some function want to change some data with another "thread". def f(): ...fetch data... x = [yield i for i in data] It should be written as belowed in Python 3.1 now def f(): x = [] for i in data: x.append((yield i)) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5577> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com