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 gvanrossum
Recipients giampaolo.rodola, gvanrossum, pitrou, richard.kiss, vstinner, yselivanov
Date 2014-04-13.20:43:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397421815.17.0.859832332242.issue21209@psf.upfronthosting.co.za>
In-reply-to
Content
I'll be darned. It appears that generator's send() method uses METH_O, which means that it really expects a single argument, but if you pass it a tuple, it assumes that you meant each item in the tuple as a separate argument. I think a more correct fix is attached -- don't add a dummy *args to the send() method, but call self.gen.send((value,)).

I'd like to fix this upstream and add some tests first; also see http://code.google.com/p/tulip/issues/detail?id=163 (which touches upon a different problem in CoroWrapper not emulating the real generator object well enough).
History
Date User Action Args
2014-04-13 20:43:35gvanrossumsetrecipients: + gvanrossum, pitrou, vstinner, giampaolo.rodola, yselivanov, richard.kiss
2014-04-13 20:43:35gvanrossumsetmessageid: <1397421815.17.0.859832332242.issue21209@psf.upfronthosting.co.za>
2014-04-13 20:43:35gvanrossumlinkissue21209 messages
2014-04-13 20:43:34gvanrossumcreate