Skip to content

Commit ac5786b

Browse files
committed
Starting incorporating feedback
1 parent c364510 commit ac5786b

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

peps/pep-9995.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Resolution:
1616
Abstract
1717
========
1818

19-
:pep:`589` defines a `class-based <https://typing.readthedocs.io/en/latest/spec/typeddict.html#class-based-syntax>`_ and a
20-
:ref:`functional syntax <typing:typeddict-functional-syntax>` to create typed
21-
dictionaries. In both scenarios, it requires defining a class or assigning to
22-
a value. In some situations, this can add unnecessary boilerplate, especially
23-
if the typed dictionary is only used once.
19+
:pep:`589` defines a :ref:`class-based <typing:typeddict-class-based-syntax>`
20+
and a :ref:`functional syntax <typing:typeddict-functional-syntax>` to create
21+
typed dictionaries. In both scenarios, it requires defining a class or
22+
assigning to a value. In some situations, this can add unnecessary boilerplate,
23+
especially if the typed dictionary is only used once.
2424

2525
This PEP proposes the addition of a new inlined syntax, by subscripting the
2626
:class:`~typing.TypedDict` type::
@@ -114,6 +114,16 @@ return the same type::
114114
T1 = TypedDict('T1', {'a': int})
115115
T2 = TypedDict[{'a': int}]
116116

117+
Typing specification changes
118+
----------------------------
119+
120+
The inlined typed dictionary syntax adds a new valid location for
121+
:term:`type expressions <typing:type expression>`. As such, the specification
122+
on :ref:`valid locations <typing:valid-types>` will need to be updated, most
123+
likely by adding a new item to the list:
124+
125+
* The definitions of the fields in the inlined typed dictionary syntax
126+
117127

118128
Backwards Compatibility
119129
=======================
@@ -190,7 +200,7 @@ While this would avoid having to import :class:`~typing.TypedDict` from
190200
parametrization overloads. On ther other hand, :class:`~typing.TypedDict` is
191201
already a :term:`special form <typing:special form>`.
192202

193-
* If fufure work extends what inlined typed dictionaries can do, we don't have
203+
* If future work extends what inlined typed dictionaries can do, we don't have
194204
to worry about impact of sharing the symbol with :class:`dict`.
195205

196206

0 commit comments

Comments
 (0)