Skip to content

Commit dbfc6a4

Browse files
gh-132139: Document that you can no longer set attributes on unions (#132146)
1 parent 0dba59e commit dbfc6a4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/whatsnew/3.14.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,8 @@ typing
11301130
For example, ``isinstance(int | str, typing.Union)`` will return ``True``; previously
11311131
this raised :exc:`TypeError`.
11321132
- The ``__args__`` attribute of :class:`typing.Union` objects is no longer writable.
1133+
- It is no longer possible to set arbitrary dunder attributes on :class:`typing.Union`
1134+
objects.
11331135

11341136
(Contributed by Jelle Zijlstra in :gh:`105499`.)
11351137

0 commit comments

Comments
 (0)