PEP 728: Wording updates for clarity in certain sections (#3724)
This commit is contained in:
parent
326a658a17
commit
8a25d5d3ea
|
@ -654,9 +654,9 @@ because such dict can be a subtype of dict::
|
|||
How to Teach This
|
||||
=================
|
||||
|
||||
The choice of ``"__extra_items__"`` and the requirement of ``closed=True``
|
||||
whenever it is used as a special key intended to make it more understandable to
|
||||
new users even without former knowledge of this feature.
|
||||
The choice of the spelling ``"__extra_items__"`` is intended to make this
|
||||
feature more understandable to new users compared to shorter alternatives like
|
||||
``"__extra__"``.
|
||||
|
||||
Details of this should be documented in both the typing spec and the
|
||||
:mod:`typing` documentation.
|
||||
|
@ -701,9 +701,10 @@ subtyping. ``closed=True`` plays a similar role in the current proposal.
|
|||
Supporting ``TypedDict(extra=type)``
|
||||
------------------------------------
|
||||
|
||||
While this design is potentially viable, there are several partially addressable
|
||||
concerns to consider. The author of this PEP thinks that it is slightly less
|
||||
favorable than the current proposal.
|
||||
During the discussion of the PEP, there were strong objections against adding
|
||||
another place where types are passed as values instead of annotations from some
|
||||
authors of type checkers. While this design is potentially viable, there are
|
||||
also several partially addressable concerns to consider.
|
||||
|
||||
- Usability of forward reference
|
||||
As in the functional syntax, using a quoted type or a type alias will be
|
||||
|
|
Loading…
Reference in New Issue