Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Immortal objects and the C API docs #104597

Closed
Labels
@JelleZijlstra

Description

@JelleZijlstra

https://docs.python.org/3.12/c-api/none.html#c.Py_None currently says that Py_None "needs to be treated just like any other object with respect to reference counts". That's not really true now that we havePEP-683 immortal objects: there is no need to incref/decref it. There are several similar places, e.g.https://docs.python.org/3.12/c-api/slice.html#ellipsis-object andhttps://docs.python.org/3.12/c-api/bool.html#c.Py_False.

The docs should be updated to somehow refer to the fact that these objects are immortal. However, extension authors who want to retain support for 3.11 and lower should continue to refcount None etc. correctly, so we shouldn't completely omit discussion of refcounting.

cc@eduardo-elizondo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp