Skip to content

Commit be16551

Browse files
committed
improve wording
1 parent f578136 commit be16551

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ Removed
121121
typing
122122
------
123123

124-
* Using ``TypedDict("T")`` or ``TypedDict("T", None)`` to construct
125-
:class:`~typing.TypedDict` with zero fields is no more supported.
126-
Use ``TypedDict("T", [])`` instead.
124+
* Using ``TD = TypedDict("TD")`` or ``TD = TypedDict("TD", None)`` to
125+
construct a :class:`~typing.TypedDict` type with zero field is no
126+
longer supported. Use ``class TTD(TypedDict): pass``
127+
or ``TD = TypedDict("TD", {})`` instead.
127128
(Contributed by Bénédikt Tran in :gh:`133823`.)
128129

129130

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Remove support for ``TypedDict("T")`` and ``TypedDict("T", None)`` calls for
2-
constructing :class:`typing.TypedDict` objects with zero fields. Patch by
3-
Bénédikt Tran.
1+
Remove support for ``TD = TypedDict("TD")`` and ``TD = TypedDict("TD", None)``
2+
calls for constructing :class:`typing.TypedDict` objects with zero field.
3+
Patch by Bénédikt Tran.

0 commit comments

Comments
 (0)