Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-105578: Add more usage examples totyping.AnyStr docs#107045

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AlexWaygood merged 5 commits intopython:mainfrommichael-the1:improve-anystr-docs
Jul 31, 2023

Conversation

michael-the1
Copy link
Contributor

@michael-the1michael-the1 commentedJul 22, 2023
edited by github-actionsbot
Loading

Add more usage examples totyping.AnyStr.

In particular, contrast it withstr | bytes, with examples of where one or the other would be used.


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

AlexWaygood reacted with heart emoji
Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

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

Thank you! Could you also add a note somewhere along the lines of:

Note that, despite its name,AnyStr has nothing to do with theAny type, nor does it mean "any string"

?

michael-the1 reacted with thumbs up emoji
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

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

Thank you, looks great!

@AlexWaygoodAlexWaygood changed the titlegh-105578: Add more usage examples totyping.AnyStrgh-105578: Add more usage examples totyping.AnyStr docsJul 31, 2023
@AlexWaygoodAlexWaygood merged commitf877b32 intopython:mainJul 31, 2023
@miss-islington
Copy link
Contributor

Thanks@michael-the1 for the PR, and@AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 31, 2023
…honGH-107045)``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion(cherry picked from commitf877b32)Co-authored-by: Michael The <michael-the1@users.noreply.github.com>
@bedevere-bot
Copy link

GH-107503 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelJul 31, 2023
@bedevere-bot
Copy link

GH-107504 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelJul 31, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 31, 2023
…honGH-107045)``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion(cherry picked from commitf877b32)Co-authored-by: Michael The <michael-the1@users.noreply.github.com>
AlexWaygood pushed a commit that referenced this pull requestJul 31, 2023
…-107045) (#107503)gh-105578: Add more usage examples to `typing.AnyStr` docs (GH-107045)``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion(cherry picked from commitf877b32)Co-authored-by: Michael The <michael-the1@users.noreply.github.com>
AlexWaygood pushed a commit that referenced this pull requestJul 31, 2023
…-107045) (#107504)gh-105578: Add more usage examples to `typing.AnyStr` docs (GH-107045)``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion(cherry picked from commitf877b32)Co-authored-by: Michael The <michael-the1@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

@Fidget-SpinnerFidget-SpinnerAwaiting requested review from Fidget-Spinner

@JelleZijlstraJelleZijlstraAwaiting requested review from JelleZijlstraJelleZijlstra is a code owner

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip newstopic-typing
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@michael-the1@miss-islington@bedevere-bot@JelleZijlstra@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp