← 输入框|github.com|刷新
Skip to content

Implement PEP 661 Sentinel Values #148829

Closed
Closed

Description

@JelleZijlstra

Feature or enhancement

Proposal:

PEP-661 has not been accepted (python/steering-council#258), but I hope to still get it in for 3.15, and in view of the short time window available I'd like to already submit a PR so those interested can review the implementation already while the SC deliberates.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added
    type-feature
    on Apr 21, 2026
  2. hugovk commented on Apr 21, 2026

    @hugovk
    Member

    And I'll be happy if any buildbot failures can be found before any last-minute merge on release day :)

  3. added
    interpreter-core
    3.15
    on Apr 21, 2026
  4. added a commit that references this issue on Apr 28, 2026
  5. added a commit that references this issue on Apr 29, 2026
  6. scoder commented on Apr 29, 2026

    @scoder
    Contributor

    Was it considered to add a macro alias PySentinel_CheckExact(o) for PySentinel_Check(o) ?
    Or is there an inherent reason why the sentinel type will never, ever allow inheritance?

  7. hugovk commented on Apr 29, 2026

    @hugovk
    Member

    There's discussion about subclassing at https://discuss.python.org/t/pep-661-sentinel-values/9126/341: not now, maybe later.

  8. added a commit that references this issue on Apr 30, 2026
  9. added 2 commits that reference this issue on May 13, 2026
  10. added 2 commits that reference this issue on May 19, 2026
  11. aayushbohara112233-blip commented on Nov 25, 2026

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

Metadata

Metadata

Assignees

Labels

3.15interpreter-coretype-feature

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions