GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PEP 750: collect spec fixes discovered during final implementation work by davepeck · Pull Request #4364 · python/peps

Conversation

@davepeck

@davepeck davepeck commented Apr 11, 2025 •
edited by AA-Turner
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • 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)

Hate to do this < 24 hours after acceptance, but as we've been going through the spec with a fine-tooth comb, @lysnikolaou and I discovered a minor spec issue in PEP 750.

The intent of the debug specifier behavior is to precisely match the behavior of current day f-strings. The PEP as accepted got one detail wrong, fixed here.

(The wrong detail: if a debug specifier is used with a format spec but no conversion — t"{value=:foo}" — the Interpolation.conversion should default to None, not s as in the accepted PEP. Having s as the default would be a departure from what f-strings do: they provide no default when there's a format_spec so that __format__() is called.)


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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@davepeck
Spec fix: make the debug spec section fully match f-string behavior
0e29282
@davepeck
davepeck requested review from gvanrossum and lysnikolaou as code owners April 11, 2025 14:57
@davepeck
Fix lint issue
954899c
@davepeck davepeck changed the title Spec fix: make the debug spec section fully match f-string behavior PEP 750: spec fix: make the debug spec section fully match f-string behavior Apr 11, 2025
davepeck added 2 commits April 11, 2025 08:08
@davepeck
!s, not :s
3ee5299
@davepeck
conversion
51ca27e
@AA-Turner

AA-Turner commented Apr 11, 2025

Copy link
Copy Markdown
Member

It might make sense to bundle all PEP changes discovered during implementation into one PR before marking the PEP as Final?

If changes based on implementation experience and user feedback are made to Standards track PEPs while in the Provisional or (with SC approval) Accepted state, they should be noted in the PEP, such that the PEP accurately describes the implementation at the point where it is marked Final.

A

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@davepeck

davepeck commented Apr 11, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

It might make sense to bundle all PEP changes discovered during implementation into one PR before marking the PEP as Final?

That makes sense. I believe that this is the only spec issue that will crop up; the implementation is largely complete and spec-matching. But to be safe, collecting/waiting until we merge into cpython beta makes sense.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lysnikolaou

lysnikolaou commented Apr 11, 2025

Copy link
Copy Markdown
Member

Yes, agreed. Let's keep this PR open (possibly also change the title) while we're finilizing the implementation and at least until some more people have reviewed it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@davepeck davepeck changed the title PEP 750: spec fix: make the debug spec section fully match f-string behavior PEP 750: collect spec issues fixes discovered during final implementation work Apr 11, 2025
@davepeck davepeck changed the title PEP 750: collect spec issues fixes discovered during final implementation work PEP 750: collect spec fixes discovered during final implementation work Apr 11, 2025
@davepeck davepeck mentioned this pull request Apr 11, 2025
When debug specifier _and_ format_spec are present, use !s as the conversion default lysnikolaou/cpython#63
Closed
@davepeck
Merge branch 'main' into pep750-debug-specifier-fix
d172707
@davepeck

davepeck commented Jun 26, 2025

Copy link
Copy Markdown
Contributor Author

We should consider how to sequence this PR (collecting miscellaneous updates) and #4395 (the template concatenation PR)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

davepeck added 2 commits June 26, 2025 10:03
@davepeck
Merge branch 'main' into pep750-debug-specifier-fix
270ac1d
@davepeck
Clarify behavior of Interpolation.expression and add a default value.
77fe765
@davepeck

davepeck commented Jun 26, 2025

Copy link
Copy Markdown
Contributor Author

Hi @lysnikolaou !

As we discussed during PyCon, I've updated the PEP to:

  1. Clarify the behavior of Interpolation.expression
  2. Make Interpolation.expression default to "" (currently a value must be provided when explicitly constructing an Interpolation)

The second change is a small but meaningful spec/implementation change — should we also open a steering council issue, or is it okay as is?

/cc @AA-Turner

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@davepeck davepeck mentioned this pull request Jun 27, 2025
gh-135676: Lexical analysis: Reword String literals and related sections python/cpython#135942
Merged
lysnikolaou
lysnikolaou approved these changes Jun 30, 2025
View reviewed changes

@lysnikolaou lysnikolaou left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@davepeck
Merge branch 'main' into pep750-debug-specifier-fix
ce1b46d
@davepeck

davepeck commented Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

This one is ready to merge, I think @AA-Turner !

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jul 8, 2025
Mark 3.14 PEPs as Final #4437
Open
gh-132661: Add default value (of "") for Interpolation.expression python/cpython#136441
Merged
AA-Turner
AA-Turner approved these changes Aug 5, 2025
View reviewed changes
@AA-Turner

AA-Turner commented Aug 5, 2025

Copy link
Copy Markdown
Member

Shall we capture the changes to t-string concatenation here @davepeck?

A

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@davepeck

davepeck commented Aug 5, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Shall we capture the changes to t-string concatenation here @davepeck?

A

@AA-Turner Think we captured those in #4395, already merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@davepeck
Merge branch 'main' into pep750-debug-specifier-fix
038c02c
@AA-Turner

AA-Turner commented Aug 5, 2025

Copy link
Copy Markdown
Member

Oops! My mistake, sorry!

A

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner
AA-Turner enabled auto-merge (squash) August 5, 2025 21:38
@davepeck

davepeck commented Aug 5, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Oops! My mistake, sorry!

Hah! There are so many PEP 750 related PRs at this point that I've personally entirely lost the plot. 😅

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner
AA-Turner merged commit c77e600 into python:main Aug 5, 2025
ethanfurman pushed a commit to ethanfurman/peps that referenced this pull request Oct 8, 2026
@davepeck @ethanfurman
PEP 750: Collect spec fixes discovered during final implementation wo…
eb8bdc9
…rk (python#4364)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AA-Turner AA-Turner AA-Turner approved these changes
@lysnikolaou lysnikolaou lysnikolaou approved these changes
@gvanrossum gvanrossum Awaiting requested review from gvanrossum gvanrossum is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@davepeck @AA-Turner @lysnikolaou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.