mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-132139: Document that you can no longer set attributes on unions (#132146)
This commit is contained in:
parent
0dba59e689
commit
dbfc6a417a
1 changed files with 2 additions and 0 deletions
|
@ -1130,6 +1130,8 @@ typing
|
|||
For example, ``isinstance(int | str, typing.Union)`` will return ``True``; previously
|
||||
this raised :exc:`TypeError`.
|
||||
- The ``__args__`` attribute of :class:`typing.Union` objects is no longer writable.
|
||||
- It is no longer possible to set arbitrary dunder attributes on :class:`typing.Union`
|
||||
objects.
|
||||
|
||||
(Contributed by Jelle Zijlstra in :gh:`105499`.)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue