From 19dd20adec4e644f4d764e0247508dcf0971185c Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Tue, 3 Mar 2026 16:53:10 -0800 Subject: [PATCH] PEP 827: Fix PartialTD example Oops, it was not actually creating a NewTypedDict. --- peps/pep-0827.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0827.rst b/peps/pep-0827.rst index 3f596f0a8ce..ea1f36a3744 100644 --- a/peps/pep-0827.rst +++ b/peps/pep-0827.rst @@ -1236,9 +1236,9 @@ We present implementations of a selection of them:: # PartialTD # Like Partial, but for TypedDicts: wraps all fields in NotRequired # rather than making them T | None. - type PartialTD[T] = typing.NewProtocol[ + type PartialTD[T] = typing.NewTypedDict[ *[ - typing.Member[p.name, NotRequired[p.type], p.quals] + typing.Member[p.name, p.type, p.quals | Literal["NotRequired"]] for p in typing.Iter[typing.Attrs[T]] ] ]