Message216035
| 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). |
|