8000 [3.10] bpo-44957: Promote PEP 604 syntax in typing docs (GH-27833) by miss-islington · Pull Request #27897 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.10] bpo-44957: Promote PEP 604 syntax in typing docs (GH-27833) #27897

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 22, 2021

Conversation

miss-islington
Copy link
Contributor
@miss-islington miss-islington commented Aug 22, 2021
  • Use "X | Y" instead of "Union" where it makes sense.
  • Mention that "X | Y" is equivalent to "Union[X, Y]" in Union section.
  • Remove "Optional[X]" as shorthand for "Union[X, None]" as the new
    shorthand is now "X | None".
  • Mention that "Optional[X]" can be written as "X | None" in section
    about "Optional".

Co-authored-by: Ken Jin 28750310+Fidget-Spinner@users.noreply.github.com
(cherry picked from commit dabb6e8)

Co-authored-by: Sebastian Rittau srittau@rittau.biz

https://bugs.python.org/issue44957

* Use "X | Y" instead of "Union" where it makes sense.
* Mention that "X | Y" is equivalent to "Union[X, Y]" in Union section.
* Remove "Optional[X]" as shorthand for "Union[X, None]" as the new
  shorthand is now "X | None".
* Mention that "Optional[X]" can be written as "X | None" in section
  about "Optional".

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit dabb6e8)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
@miss-islington
Copy link
Contributor Author

@srittau and @ambv: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@srittau and @ambv: Status check is done, and it's a success ❌ .

@ambv
Copy link
Contributor
ambv commented Aug 22, 2021

Copy link
Contributor
@ambv ambv left a comment

Choose a reason for hiding this comment

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

Doc-only change.

@miss-islington miss-islington merged commit 57b321c into python:3.10 Aug 22, 2021
@miss-islington miss-islington deleted the backport-dabb6e8-3.10 branch August 22, 2021 20:04
@miss-islington
Copy link
Contributor Author

@srittau and @ambv: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0