Skip to content

INT-GEN-01: Adopt generators and comprehensions #120

Open

Description

@ellainng

Scope

  • Specify generator construction, yield/yield from, send/throw/close and suspended ownership before admitting the syntax.
  • Adopt list/dict/set/generator comprehensions with Python scope and evaluation order. Cover finally, exhaustion, exceptions and cancellation. Coordinate parked ownership with INT-10: Implement asynchronous execution and browser host adapters #34 without requiring the full async application milestone.

Evidence and limits

Pinned CPython 3.14.7 is the semantic oracle. Run independently compiled Python source in Node and Chromium; record supported signatures, explicit refusals and zero logical teardown. Core-source and classes-source admission remain explicit. Library/package coverage, browser capabilities and native ABI support are separate claims. No publication or deployment is included.

Dependencies and readiness

Readiness: Ready. Iteration #113 and function binding #118 are accepted on main. Dependent work may use focused stacked PRs.

Tracked by the versioned broad-compatibility inventory in #99. The parent class milestone #33 and async milestone #34 remain open.

Finite generator/object checkpoint — 2026-10-26

Merged #240, #241, #242, #243, #244 and the focused diagnostic correction #246. Final main is a760a5bceb16e3d210c15edc79f1fbd2594e639c; all five final-main CI jobs pass. Each dependent tree and focused diff was preserved after the actual parent squash and fresh checks, without rewriting shared history. All six child issues are closed and their Project items are Done.

The finite generator contract is delivered in both source profiles. The composed example also exercises reflection and arithmetic.

Validation: 368 Node tests and 60 Python tests; generators have 36 class and 33 shared core observations across all eight Node/Chromium, drain/step, class/core combinations. Object protocols have 46 observations across four target/driver combinations. The twelve retained protocol reports contain 460 passing observations, 436 measured zero logical teardown records and 40 exact injected frame/context observations. Their corpora and 55 source/script hashes match final main. Offline acceptance has 416 program comparisons, 42 acceptance groups and 90 Stop/Restart cycles. The eight prior composed resource baselines remain unchanged. Both demonstration consoles build. No dependency, host capability, release, publication or deployment change is included.

This parent remains open / In Progress for comprehension assignment expressions, deprecated multi-argument throw, generator introspection and stronger finalization behavior through separate finite contracts. Hard cancellation/session shutdown releases ownership without executing arbitrary finalizers. Native async generators/comprehensions, persistent sessions and host scheduling remain under #34. The object construction/reflection continuation remains #123.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions