Skip to content

How to distinguish yield of a value vs exhaustion of the generator #10

@smontanaro

Description

@smontanaro

In Objects/genobject.c, it distinguishes between a simple yield and exhaustion of the generator by testing f->f_stacktop:

if (result && f->f_stacktop == NULL) {
... exhausted ...
}
else ... {
... normal yield ...
}

Need a way to signal the distinction without relying on f->f_stacktop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions