We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1a156a commit 74e861fCopy full SHA for 74e861f
peps/pep-0747.rst
@@ -289,11 +289,13 @@ Type checkers should validate that this argument is a valid type expression::
289
x1 = TypeForm(str | None)
290
reveal_type(v1) # Revealed type is "TypeForm[str | None]"
291
292
- x2 = TypeForm("list[int]")
+ x2 = TypeForm('list[int]')
293
revealed_type(v2) # Revealed type is "TypeForm[list[int]]"
294
295
x3 = TypeForm('type(1)') # Error: invalid type expression
296
297
+The static type of a ``TypeForm(T)`` is ``TypeForm[T]``.
298
+
299
At runtime the ``TypeForm(...)`` callable simply returns the value passed to it.
300
301
This explicit syntax serves two purposes. First, it documents the developer's
0 commit comments