From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/python~3.12/c-api%2Fgen.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 devdocs/python~3.12/c-api%2Fgen.html (limited to 'devdocs/python~3.12/c-api%2Fgen.html') diff --git a/devdocs/python~3.12/c-api%2Fgen.html b/devdocs/python~3.12/c-api%2Fgen.html new file mode 100644 index 00000000..e345d932 --- /dev/null +++ b/devdocs/python~3.12/c-api%2Fgen.html @@ -0,0 +1,24 @@ +

Generator Objects

Generator objects are what Python uses to implement generator iterators. They are normally created by iterating over a function that yields values, rather than explicitly calling PyGen_New() or PyGen_NewWithQualName().

+type PyGenObject
+

The C structure used for generator objects.

+
+PyTypeObject PyGen_Type
+

The type object corresponding to generator objects.

+
+int PyGen_Check(PyObject *ob)
+

Return true if ob is a generator object; ob must not be NULL. This function always succeeds.

+
+int PyGen_CheckExact(PyObject *ob)
+

Return true if ob’s type is PyGen_Type; ob must not be NULL. This function always succeeds.

+
+PyObject *PyGen_New(PyFrameObject *frame)
+Return value: New reference.

Create and return a new generator object based on the frame object. A reference to frame is stolen by this function. The argument must not be NULL.

+
+PyObject *PyGen_NewWithQualName(PyFrameObject *frame, PyObject *name, PyObject *qualname)
+Return value: New reference.

Create and return a new generator object based on the frame object, with __name__ and __qualname__ set to name and qualname. A reference to frame is stolen by this function. The frame argument must not be NULL.

+
+

+ © 2001–2023 Python Software Foundation
Licensed under the PSF License.
+ https://docs.python.org/3.12/c-api/gen.html +

+
-- cgit v1.2.3