Skip to content

PEP 661: Amend to allow two customizations#4968

Open
JelleZijlstra wants to merge 2 commits into
python:mainfrom
JelleZijlstra:pep661-custom
Open

PEP 661: Amend to allow two customizations#4968
JelleZijlstra wants to merge 2 commits into
python:mainfrom
JelleZijlstra:pep661-custom

Conversation

@JelleZijlstra
Copy link
Copy Markdown
Member

These are changes I'd like to make during the beta phase (I'll post asking for SC approval).

  • Change is either:
    • To a Draft PEP
    • To an Accepted or Final PEP, with Steering Council approval
    • To fix an editorial issue (markup, typo, link, header, etc)
  • PR title prefixed with PEP number (e.g. PEP 123: Summary of changes)

@JelleZijlstra JelleZijlstra requested a review from taleinat as a code owner May 10, 2026 22:48
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 10, 2026

@taleinat
Copy link
Copy Markdown
Contributor

taleinat commented May 11, 2026

Both of these, customizable repr and setting __module__, were in earlier versions of the PEP and make sense.

Regarding making repr customizable by passing in an argument, LGTM.

Regarding making __module__ writeable, I find that a bit surprising. Have you considered adding another argument to sentinel()? That would be more in line with namedtuple and Enum which do this for similar reasons, and be more in line with sentinels being immutable. (I see Kyle made a similar comment in the PEP discussion.)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants