Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
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"
?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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.
Thank you, looks great!
typing.AnyStr
typing.AnyStr
docsThanks@michael-the1 for the PR, and@AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…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 commentedJul 31, 2023
GH-107503 is a backport of this pull request to the3.12 branch. |
bedevere-bot commentedJul 31, 2023
GH-107504 is a backport of this pull request to the3.11 branch. |
…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>
Uh oh!
There was an error while loading.Please reload this page.
Add more usage examples to
typing.AnyStr
.In particular, contrast it with
str | bytes
, with examples of where one or the other would be used.typing.AnyStr
#105578📚 Documentation preview 📚:https://cpython-previews--107045.org.readthedocs.build/