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 — gh-129667: Update annotation in documentation by donbarbos · Pull Request #129669 · python/cpython

Conversation

@donbarbos

@donbarbos donbarbos commented Feb 4, 2025 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Update annotation parameters for objects in documentation #129667

📚 Documentation preview 📚: https://cpython-previews--129669.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

All reactions
@donbarbos
Update annotation in documentation
3dd34eb
@donbarbos
donbarbos requested review from ericvsmith, ethanfurman and jaraco as code owners February 4, 2025 21:19
@bedevere-app bedevere-app Bot added the awaiting review label Feb 4, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Feb 4, 2025
Update annotation parameters for objects in documentation #129667
Open
@donbarbos
Merge branch 'main' into issue-129667
da0750d
@rhettinger

rhettinger commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

IIRC there was a decision to not litter the docs the trailing backslash. People find it confusing and it doesn't seem to help them in any way.

All reactions

Sorry, something went wrong.

Uh oh!

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

@rhettinger rhettinger added the DO-NOT-MERGE label Feb 5, 2025
@donbarbos
Revert adding '/' in params
ec2398f
@donbarbos

donbarbos commented Feb 5, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

@rhettinger sorry, I fixed it. but other changes are relevant, isn't it?

All reactions

Sorry, something went wrong.

Uh oh!

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

@AlexWaygood

AlexWaygood commented Feb 5, 2025

Copy link
Copy Markdown
Member

IIRC there was a decision to not litter the docs the trailing backslash. People find it confusing and it doesn't seem to help them in any way.

@rhettinger, the Editorial Board's recent decision was that PEP-570 syntax should be used in documentation. This is now documented in the devguide; see python/devguide#1344. The Editorial Board has a standing delegation from the Steering Council on all documentation matters: https://github.com/python/steering-council/blob/main/process/standing-delegations.md#documentation-editorial-board

donbarbos and willingc reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

@donbarbos

donbarbos commented Feb 5, 2025

Copy link
Copy Markdown
Contributor Author

@AlexWaygood

the Editorial Board's recent decision was that PEP-570 syntax should be used in documentation. This is now documented in the devguide; see python/devguide#1344. The Editorial Board has a standing delegation from the Steering Council on all documentation matters: https://github.com/python/steering-council/blob/main/process/standing-delegations.md#documentation-editorial-board

So should I put / back or wait for rhettinger's answer?

All reactions

Sorry, something went wrong.

Uh oh!

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

@rhettinger rhettinger removed the DO-NOT-MERGE label Feb 5, 2025
@rhettinger

rhettinger commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

the Editorial Board's recent decision was that PEP-570 syntax should be used in documentation.

Then this PR can go forward.

It's a bummer though. Signatures with trailing backslashes are intrinsically less readable. People who are only occasional users of Python find it confusing (likely because no other language does this). This makes the docs less accessible to average users. A high school student shouldn't have to see len(obj, /). It just gets in the way of learning and makes Python look cryptic even for its simplest functions.

All reactions

Sorry, something went wrong.

Uh oh!

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

@donbarbos
Revert "Revert adding '/' in params"
f2f86ab
This reverts commit ec2398f.
@donbarbos

donbarbos commented Feb 5, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

A high school student shouldn't have to see len(obj, /).

I think they use other sources of knowledge, and most likely the docs reader is familiar with python syntax.

And also it would be nice to add "skip news" label

All reactions

Sorry, something went wrong.

Uh oh!

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

@rhettinger

rhettinger commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

I think they use other sources of knowledge, and most likely the docs reader is familiar with python syntax.

My direct experience says otherwise. When people take an introductory python course, the positional-only/keword-only syntax is rarely covered. There is just too much else to talk about. Introductory books on Python typically defer discussion on this topic until all other core topics have been covered.

Also, it seems like an anti-goal to reduce accessiblity and expect some user categories to search elsewhere for knowledge. AFAICT, we've always wanted to maximize accessibility for all users.

All reactions

Sorry, something went wrong.

Uh oh!

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

@donbarbos
Merge branch 'main' into issue-129667
ab580de
@nedbat

nedbat commented Feb 13, 2025

Copy link
Copy Markdown
Member

At a recent Editorial Board meeting, we re-affirmed the principle of the reference documentation being precise. The function signatures should have slashes to indicate arguments that are positional-only. It can be a bit confusing to new learners, so we'll be experimenting with adjustments to the Sphinx rendering to help people understand the syntax.

donbarbos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

This was referenced Mar 30, 2025
gh-131885: Document that dict.setdefault takes no keyword arguments #128208
Merged
Update function signatures to use * and / as needed #131885
Open
@picnixz picnixz added the skip news label Mar 30, 2025
picnixz
picnixz reviewed Mar 30, 2025
View reviewed changes

@picnixz picnixz 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.

I'm a bit conflicted with the fact that we're now showing the internal parameters in the signatures. Yes, it could be helpful indeed, but it also exposes implementation details. For functions, I think we could implicitly not include them because an external caller is not meant to use them (probably), however for methods, if the class can be inherited, then children classes may want to know the complete signature just to be sure that they do not violate the Liskov substitution principle.

However, as I said on some functions/methods, I prefer that we don't add new parameters in this PR but only add the positional-only markers. In separate PRs, each added parameter should either explicitly be marked as internal (in the docs) or we should not show it if callers or subclasses do not need to know about it.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/library/concurrent.futures.rst Resolved

Uh oh!

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

Comment thread Doc/library/dataclasses.rst Resolved

Uh oh!

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

Comment thread Doc/library/http.server.rst Resolved

Uh oh!

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

Comment thread Doc/library/json.rst Resolved

Uh oh!

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

donbarbos added 2 commits March 30, 2025 18:33
@donbarbos
Revert some updates
c24d1a1
@donbarbos
Add description for ctxkwargs
f576ea5
picnixz
picnixz reviewed Apr 4, 2025
View reviewed changes

@picnixz picnixz 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.

Can you first address the new comments and then check that all the remaining modifications are actually backportable to 3.12 as well? TiA

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/library/code.rst Resolved

Uh oh!

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

Comment thread Doc/library/concurrent.futures.rst Resolved

Uh oh!

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

Comment thread Doc/library/concurrent.futures.rst Resolved

Uh oh!

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

Comment thread Doc/library/code.rst Resolved

Uh oh!

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

Comment thread Doc/library/concurrent.futures.rst Resolved

Uh oh!

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

@donbarbos
Revert "adding *ctxkwargs* to ThreadPoolExecutor"
4e021da
@donbarbos donbarbos mentioned this pull request May 20, 2025
gh-124694: Document missing ctxkwargs argument in ThreadPoolExecutor #134321
Merged
jaraco
jaraco reviewed Jul 19, 2025
View reviewed changes

@jaraco jaraco 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.

I approve for configparser changes.

Sorry, something went wrong.

Uh oh!

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

All reactions
@donbarbos
Revert code.rst changes
b025313
@github-actions

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jaraco jaraco jaraco left review comments
@picnixz picnixz picnixz left review comments
@ethanfurman ethanfurman Awaiting requested review from ethanfurman ethanfurman is a code owner
@ericvsmith ericvsmith Awaiting requested review from ericvsmith

Uh oh!

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

Assignees

No one assigned

Labels

awaiting review skip news stale Stale PR or inactive for long period of time.

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.

6 participants

@donbarbos @rhettinger @AlexWaygood @nedbat @jaraco @picnixz
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.