Skip to content

PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields #4365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jb2170
Copy link

@jb2170 jb2170 commented Apr 11, 2025

Draft PR for new PEP 791

Sponsor Pending

There is a TODO section in the PEP that shall perish as the PEP is tweaked before even considering merging

Relevant discussions, issues, PRs linked

https://discuss.python.org/t/implement-precision-format-spec-for-int-type-data/80760
python/cpython#131926
python/cpython#74756

Basic requirements (all PEP Types)

  • Read and followed PEP 1 & PEP 12
  • File created from the latest PEP template
  • PEP has next available number, & set in filename (pep-NNNN.rst), PR title (PEP 123: <Title of PEP>) and PEP header
  • Title clearly, accurately and concisely describes the content in 79 characters or less
  • Core dev/PEP editor listed as Author or Sponsor, and formally confirmed their approval: sponsor pending
  • Author, Status (Draft), Type and Created headers filled out correctly
  • PEP-Delegate, Topic, Requires and Replaces headers completed if appropriate
  • Required sections included
    • Abstract (first section)
    • Copyright (last section; exact wording from template required)
  • Code is well-formatted (PEP 7/PEP 8) and is in code blocks, with the right lexer names if non-Python: everything but 80-column line length, so as to avoid tedious re-aligning during this draft stage
  • PEP builds with no warnings, pre-commit checks pass and content displays as intended in the rendered HTML
  • Authors/sponsor added to .github/CODEOWNERS for the PEP: sponsor pending

Standards Track requirements

  • PEP topic discussed in a suitable venue with general agreement that a PEP is appropriate
  • Suggested sections included (unless not applicable)
    • Motivation: included in Rationale
    • Rationale
    • Specification: on the TODO list if an RFC 2119 style summary is needed
    • Backwards Compatibility
    • Security Implications: not needed?
    • How to Teach This: Examples And Teaching section
    • Reference Implementation
    • Rejected Ideas
    • Open Issues: None so far
  • Python-Version set to valid (pre-beta) future Python version, if relevant: pending
  • Any project stated in the PEP as supporting/endorsing/benefiting from the PEP formally confirmed such: none
  • Right before or after initial merging, PEP discussion thread created and linked to in Discussions-To and Post-History

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

@jb2170 jb2170 requested a review from a team as a code owner April 11, 2025 18:55
@AA-Turner AA-Turner marked this pull request as draft April 11, 2025 19:37
@AA-Turner AA-Turner changed the title PEP 791: Precision and Modulo-Precision Flag format specifiers for integer fields [DRAFT][Pending Sponsor] PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [DRAFT][Pending Sponsor] Apr 11, 2025
@@ -0,0 +1,360 @@
PEP: 791
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you get a sponsor, the next number is either 785 or 786.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I didn't see the original Discourse thread, I've definitely been bitten by the # vs field width problem, so I'd be happy to be listed as a PEP sponsor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, let's use 785 for #4357 and 786 here.

@AA-Turner AA-Turner added the new-pep A new draft PEP submitted for initial review label Apr 11, 2025
@hugovk hugovk changed the title PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [DRAFT][Pending Sponsor] PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] Apr 11, 2025
@hugovk hugovk changed the title PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] Apr 12, 2025
@hugovk hugovk changed the title PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-pep A new draft PEP submitted for initial review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants