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 alexandre.vassalotti
Recipients alexandre.vassalotti, georg.brandl, scoder
Date 2009-08-11.21:58:23
SpamBayes Score 0.000393741
Marked as misclassified No
Message-id <1250027904.95.0.0238005941255.issue6673@psf.upfronthosting.co.za>
In-reply-to
Content
Not a bug.

The list comprehension in your chunker:

    while True:
        target.send([ (yield) for i in range(chunk_size) ])

is equivalent to the following generator in Python 3:

    while True:
        def g():
            for i in range(chunk_size):
                yield (yield)
        target.send(list(g()))

This clearly needs not what you want. So, just rewrite your code using
for-loop:

    while True:
        result = []
        for i in range(chunk_size):
            result.append((yield))
        target.send(result)
History
Date User Action Args
2009-08-11 21:58:25alexandre.vassalottisetrecipients: + alexandre.vassalotti, georg.brandl, scoder
2009-08-11 21:58:24alexandre.vassalottisetmessageid: <1250027904.95.0.0238005941255.issue6673@psf.upfronthosting.co.za>
2009-08-11 21:58:23alexandre.vassalottilinkissue6673 messages
2009-08-11 21:58:23alexandre.vassalotticreate