@@ -324,7 +324,7 @@ from "PEP 646 – Variadic Generics".
324324When inferring types here, the type checker should **infer literal
325325types when possible **. This means inferring literal types for
326326arguments that **do not ** appear in the bound, as well as
327- for arguments that **do ** appear in the bound as read-only (TODO : Or
327+ for arguments that **do ** appear in the bound as read-only (QUESTION : Or
328328maybe we should make whether to do it for extra arguments
329329configurable in the ``TypedDict `` serving as the bound somehow? If
330330``readonly `` had been added as a parameter to ``TypedDict `` we would
@@ -413,9 +413,9 @@ or, using the type abbreviations we provide::
413413
414414(Rationale discussed :ref: `below <callable-rationale >`.)
415415
416- .. TODO : Should the extended argument list be wrapped in a
417- .. ``typing.Parameters[*Params]`` type (that will also kind of serve as a
418- .. bound for ``ParamSpec``)?
416+ QUESTION : Should the extended argument list be wrapped in a
417+ ``typing.Parameters[*Params] `` type (that will also kind of serve as a
418+ bound for ``ParamSpec ``)?
419419
420420
421421Specification
@@ -729,26 +729,24 @@ Callable format discussed above.
729729The names, type, and qualifiers share associated type names with
730730``Member `` (``.name ``, ``.type ``, and ``.quals ``).
731731
732- .. TODO: Should we make ``.init`` be literal types of default parameter values too?
733-
734732.. _generic-callable :
735733
736734Generic Callable
737735''''''''''''''''
738736
739- * ``GenericCallable[Vs, lambda <vs>: Ty] ``: A generic callable. ``Vs `` are a tuple
740- type of unbound type variables and ``Ty `` should be a `` Callable ``,
741- ``staticmethod ``, or ``classmethod `` that has access to the
742- variables in ``Vs `` via the bound variables in ``<vs> ``.
737+ * ``GenericCallable[Vs, lambda <vs>: Ty] ``: A generic callable. ``Vs ``
738+ are a tuple type of unbound type variables and ``Ty `` should be a
739+ ``Callable ``, `` staticmethod ``, or ``classmethod `` that has access
740+ to the variables in ``Vs `` via the bound variables in ``<vs> ``.
743741
744742For now, we restrict the use of ``GenericCallable `` to
745743the type argument of ``Member ``, to disallow its use for
746744locals, parameter types, return types, nested inside other types,
747745etc. Rationale discussed :ref: `below <generic-callable-rationale >`.
748746
749- .. TODO: Decide if we have any mechanisms to inspect/destruct
750- .. ``GenericCallable``. Maybe can fetch the variable information and
751- .. maybe can apply it to concrete types?
747+ QUESTION: Should we have any mechanisms to inspect/destruct
748+ ``GenericCallable ``. Maybe can fetch the variable information and
749+ maybe can apply it to concrete types?
752750
753751Overloaded function types
754752'''''''''''''''''''''''''
@@ -1229,10 +1227,14 @@ I am proposing a fully new extended callable syntax because:
12291227 closely mimic the ``mypy_extensions `` version though, if something new
12301228 is a non-starter)
12311229
1232- TODO : Currently I made the qualifiers be short strings, for code brevity
1230+ QUESTION : Currently I made the qualifiers be short strings, for code brevity
12331231when using them, but an alternate approach would be to mirror
12341232``inspect.Signature `` more directly, and have an enum with names like
1235- ``ParamKind.POSITIONAL_OR_KEYWORD ``.
1233+ ``ParamKind.POSITIONAL_OR_KEYWORD ``. Would that be better?
1234+
1235+ A related potential change would be to fully separate the kind from whether
1236+ there is a default, and have whether there is a default represented in
1237+ an ``init `` field, like we do for ``Member ``.
12361238
12371239.. _generic-callable-rationale :
12381240
0 commit comments