gh-105578: Add more usage examples to typing.AnyStr docs by michael-the1 · Pull Request #107045 · python/cpython (original) (raw)

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

Already on GitHub?Sign in to your account

Conversation12 Commits5 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

michael-the1

@michael-the1

AlexWaygood

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 the Any type, nor does it mean "any string"

?

JelleZijlstra

@michael-the1

AlexWaygood

@michael-the1 @AlexWaygood

Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com

@AlexWaygood

AlexWaygood

@michael-the1 @AlexWaygood

Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com

AlexWaygood

Choose a reason for hiding this comment

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

Thank you, looks great!

@AlexWaygood AlexWaygood changed the titlegh-105578: Add more usage examples to typing.AnyStr gh-105578: Add more usage examples to typing.AnyStr docs

Jul 31, 2023

@miss-islington

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 request

Jul 31, 2023

@michael-the1 @miss-islington

…honGH-107045)

typing.AnyStr has different semantics to str | bytes, which often leads to user confusion (cherry picked from commit f877b32)

Co-authored-by: Michael The michael-the1@users.noreply.github.com

@bedevere-bot

@bedevere-bot

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jul 31, 2023

@michael-the1 @miss-islington

…honGH-107045)

typing.AnyStr has different semantics to str | bytes, which often leads to user confusion (cherry picked from commit f877b32)

Co-authored-by: Michael The michael-the1@users.noreply.github.com

AlexWaygood pushed a commit that referenced this pull request

Jul 31, 2023

@miss-islington @michael-the1

…-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 commit f877b32)

Co-authored-by: Michael The michael-the1@users.noreply.github.com

AlexWaygood pushed a commit that referenced this pull request

Jul 31, 2023

@miss-islington @michael-the1

…-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 commit f877b32)

Co-authored-by: Michael The michael-the1@users.noreply.github.com