]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Better runtime TypedDict (GH-17214)
authorZac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
Sun, 24 Nov 2019 10:48:48 +0000 (21:48 +1100)
committerIvan Levkivskyi <levkivskyi@gmail.com>
Sun, 24 Nov 2019 10:48:48 +0000 (10:48 +0000)
commit665ad3dfa9993b9a4000b097ddead4e292590e8c
tree886741ee4ffc36e769575e51b5e576d1f8e22b02
parent041d8b48a2e59fa642b2c5124d78086baf74e339
Better runtime TypedDict (GH-17214)

This patch enables downstream projects inspecting a TypedDict subclass at runtime to tell which keys are optional.

This is essential for generating test data with Hypothesis or validating inputs with typeguard or pydantic.
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2019-11-18-17-08-23.bpo-38834.abcdef.rst [new file with mode: 0644]