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 }})
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"
?
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
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 changed the title
gh-105578: Add more usage examples to gh-105578: Add more usage examples to typing.AnyStr
typing.AnyStr
docs
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
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
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
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
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
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