Skip to content

PEP 661: Some changes after submission (before SC review) - #4232

Merged
taleinat merged 11 commits into
python:mainfrom
taleinat:pep-661-after-submission-changes
Jan 27, 2025
Merged

taleinat merged 11 commits into
python:mainfrom
taleinat:pep-661-after-submission-changes

Conversation

@taleinat

@taleinat taleinat commented Jan 26, 2025 •

Copy link
Copy Markdown
Contributor

Simplify the suggestion further by making it more opinionated: remove the options to customize the repr and the truthiness.

Use "sentinellib" rather than "sentinels" for the proposed module name, to avoid clashing with an existing popular package on PyPI.

Also a few minor tweaks to wording.


📚 Documentation preview 📚: https://pep-previews--4232.org.readthedocs.build/

@taleinat
taleinat force-pushed the pep-661-after-submission-changes branch from 76d90f0 to a54b989 Compare January 26, 2025 21:17
Comment thread peps/pep-0661.rst Resolved
Comment thread peps/pep-0661.rst Resolved
Comment thread peps/pep-0661.rst Resolved
Comment thread peps/pep-0661.rst Resolved
@taleinat
taleinat merged commit d386fff into python:main Jan 27, 2025
@taleinat
taleinat deleted the pep-661-after-submission-changes branch January 27, 2025 20:19
ethanfurman pushed a commit to ethanfurman/peps that referenced this pull request Oct 8, 2026
* Use "sentinellib" for the new module name
  This avoids breaking code using the existing "sentinels" PyPI package.
* Change type annotations to use the bare name rather than Literal
* Use sys._getframemodulename() instead of sys._getframe() in inline reference impl
* Simplify, dropping support for custom repr and setting truthiness
* Tweak some wording
* A few more words about the advantages of the bare name for type signatures
* Correct __reduce__ in the reference impl
* Use the fully qualified name for the repr even when defined in a class
* Remove custom repr in the example for the sentinel decorator suggestion
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.

4 participants