| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Partially revert pythonGH-105499. types.UnionType no longer an alias of typing.Union and no longer subscriptable, but subscribing typing.Union returns an instance of types.UnionType. typing.Union can no longer be used in the isinstance() checks.
There was a problem hiding this comment.
I don't think anything should be changed here.
Sorry, something went wrong.
|
When you're done making the requested changes, leave the comment: I have made the requested changes; please review again. |
Sorry, something went wrong.
| - Both syntaxes for creating a union now produce the same string representation in | ||
| ``repr()``. For example, ``repr(Union[int, str])`` | ||
| is now ``"int | str"`` instead of ``"typing.Union[int, str]"``. | ||
| - Unions created using the old syntax are no longer cached. Previously, running |
There was a problem hiding this comment.
Not sure why this was removed; the text would seem to still apply under this PR.
Sorry, something went wrong.
|
I now think that we need a full revert. See #138967. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Partially revert GH-105499.
types.UnionType no longer an alias of typing.Union and no longer subscriptable, but subscribing typing.Union returns an instance of types.UnionType. typing.Union can no longer be used in the isinstance() checks.
📚 Documentation preview 📚: https://cpython-previews--137069.org.readthedocs.build/