python / python/cpython

The case generator no longer reports escaping calls in conditions as an error.

Open
#135,193 0 comments 0 reactions 1 assignee View on GitHub

@markshannon is already working on this.

Since Jun 5, 2025.

interpreter-core type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

In bytecodes.c this should be an error, as the code generator cannot correctly wrap the escaping call in spill code:

    if (escaping_call(()) {

but this is no longer reported as an error.

This doesn't seem to be causing any problems, but I did notice it when modifying bytecodes.c recently, and it should be fixed.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.