File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1190,16 +1190,16 @@ List of currently incomplete/experimental features:
11901190
11911191 .. code-block :: python
11921192
1193- def test_values () -> TypedDict[{" int " : int , " str " : str }]:
1194- return {" int " : 42 , " str " : " test " }
1193+ def get_movie () -> TypedDict[{" name " : str , " year " : int }]:
1194+ return {" name " : " Blade Runner " , " year " : 1982 }
11951195
11961196 * ``InlineTypedDict ``: this feature enables non-standard syntax for inline
11971197 :ref: `TypedDicts <typeddict >`, for example:
11981198
11991199 .. code-block :: python
12001200
1201- def test_values () -> {" int " : int , " str " : str }:
1202- return {" int " : 42 , " str " : " test " }
1201+ def get_movie () -> {" name " : str , " year " : int }:
1202+ return {" name " : " Blade Runner " , " year " : 1982 }
12031203
12041204
12051205 Miscellaneous
Original file line number Diff line number Diff line change @@ -303,8 +303,8 @@ to use inline TypedDict syntax. For example:
303303
304304.. code-block :: python
305305
306- def test_values () -> TypedDict[{" int " : int , " str " : str }]:
307- return {" int " : 42 , " str " : " test " }
306+ def get_movie () -> TypedDict[{" name " : str , " year " : int }]:
307+ return {" name " : " Blade Runner " , " year " : 1982 }
308308
309309 class Response (TypedDict ):
310310 status: int
@@ -318,8 +318,8 @@ to use inline TypedDict syntax. For example:
318318
319319 .. code-block :: python
320320
321- def test_values () -> {" int " : int , " str " : str }:
322- return {" int " : 42 , " str " : " test " }
321+ def get_movie () -> {" name " : str , " year " : int }:
322+ return {" name " : " Blade Runner " , " year " : 1982 }
323323
324324 This legacy syntax can be enabled using ``--enable-incomplete-feature=InlineTypedDict ``.
325325 Due to ambiguity with a regular variables, the legacy syntax may only be used in
You can’t perform that action at this time.
0 commit comments