Skip to content

Commit 467e5b5

Browse files
authored
PEP 655: Mark as Final (#3672)
1 parent 433958e commit 467e5b5

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

peps/pep-0655.rst

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ Title: Marking individual TypedDict items as required or potentially-missing
33
Author: David Foster <david at dafoster.net>
44
Sponsor: Guido van Rossum <guido at python.org>
55
Discussions-To: https://mail.python.org/archives/list/[email protected]/thread/53XVOD5ZUKJ263MWA6AUPEA6J7LBBLNV/
6-
Status: Accepted
6+
Status: Final
77
Type: Standards Track
88
Topic: Typing
9-
Content-Type: text/x-rst
109
Created: 30-Jan-2021
1110
Python-Version: 3.11
1211
Post-History: 31-Jan-2021, 11-Feb-2021, 20-Feb-2021, 26-Feb-2021, 17-Jan-2022, 28-Jan-2022
1312
Resolution: https://mail.python.org/archives/list/[email protected]/message/AJEDNVC3FXM5QXNNW5CR4UCT4KI5XVUE/
1413

14+
.. canonical-typing-spec:: :ref:`typing:required-notrequired`
1515

1616
Abstract
1717
========
@@ -309,7 +309,8 @@ within the same TypedDict definition:
309309

310310
Yes:
311311

312-
::
312+
.. code-block::
313+
:class: good
313314
314315
from __future__ import annotations # for Python 3.7-3.9
315316
@@ -319,15 +320,17 @@ Yes:
319320
320321
Okay (required for Python 3.5.3-3.6):
321322

322-
::
323+
.. code-block::
324+
:class: maybe
323325
324326
class Dog(TypedDict):
325327
name: str
326328
owner: 'NotRequired[str|None]'
327329
328330
No:
329331

330-
::
332+
.. code-block::
333+
:class: bad
331334
332335
class Dog(TypedDict):
333336
name: str
@@ -345,7 +348,8 @@ than ``typing.TypedDict`` because the latter will not understand
345348

346349
Yes (Python 3.11+ only):
347350

348-
::
351+
.. code-block::
352+
:class: good
349353
350354
from typing import NotRequired, TypedDict
351355
@@ -355,7 +359,8 @@ Yes (Python 3.11+ only):
355359
356360
Yes (Python <3.11 and 3.11+):
357361

358-
::
362+
.. code-block::
363+
:class: good
359364
360365
from __future__ import annotations # for Python 3.7-3.9
361366
@@ -367,7 +372,8 @@ Yes (Python <3.11 and 3.11+):
367372
368373
No (Python <3.11 and 3.11+):
369374

370-
::
375+
.. code-block::
376+
:class: bad
371377
372378
from typing import TypedDict # oops: should import from typing_extensions instead
373379
from typing_extensions import NotRequired
@@ -667,13 +673,3 @@ Copyright
667673

668674
This document is placed in the public domain or under the
669675
CC0-1.0-Universal license, whichever is more permissive.
670-
671-
672-
..
673-
Local Variables:
674-
mode: indented-text
675-
indent-tabs-mode: nil
676-
sentence-end-double-space: t
677-
fill-column: 70
678-
coding: utf-8
679-
End:

0 commit comments

Comments
 (0)