Skip to content

[3.11] gh-105578: Add more usage examples to typing.AnyStr docs (GH-107045)#107504

Merged
AlexWaygood merged 1 commit into
python:3.11from
miss-islington:backport-f877b32-3.11
Jul 31, 2023
Merged

[3.11] gh-105578: Add more usage examples to typing.AnyStr docs (GH-107045)#107504
AlexWaygood merged 1 commit into
python:3.11from
miss-islington:backport-f877b32-3.11

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Jul 31, 2023

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


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

…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>