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 Mark.Shannon
Recipients Mark.Shannon, lukasz.langa, scoder, serhiy.storchaka, v2m, yselivanov
Date 2020-09-17.10:03:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600336999.14.0.581102488189.issue41756@roundup.psfhosted.org>
In-reply-to
Content
I agree with Serhiy, that `PyGen_` is a bad prefix.

Unless a function takes generator objects and *only* generators objects, then it shouldn't have a `PyGen` prefix.

The API function is the C equivalent of obj.send(val).
The first parameter is an object.

Coroutines do not inherit from generators.
That the the C implementations are so coupled is an unfortunate historical accident, and may well be changed.

Regardless of how this is implemented internally, any API function's signature should reflect the equivalent Python code.
And please use an enum, not an int, as the return value. It's a huge boon for readability.

I would suggest:
`PySendResult PyIter_Send(PyObject *obj, PyObject *arg, PyObject **result);`
History
Date User Action Args
2020-09-17 10:03:19Mark.Shannonsetrecipients: + Mark.Shannon, scoder, lukasz.langa, serhiy.storchaka, yselivanov, v2m
2020-09-17 10:03:19Mark.Shannonsetmessageid: <1600336999.14.0.581102488189.issue41756@roundup.psfhosted.org>
2020-09-17 10:03:19Mark.Shannonlinkissue41756 messages
2020-09-17 10:03:18Mark.Shannoncreate