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 bcb1790 commit 194c8c8Copy full SHA for 194c8c8
docs/pages/concept.rst
@@ -126,15 +126,15 @@ Example:
126
... def _some_some(instance: Some) -> int:
127
... return 2
128
129
- >>> assert some(1) == 2
+ >>> argument = 1
130
+ >>> assert isinstance(argument, Some)
131
+ >>> assert some(argument) == 2
132
133
.. note::
134
135
It is impossible for ``mypy`` to understand that ``1`` has ``Some``
136
type in this example. Be careful, it might break your code!
137
- Consider that this feature is limited to ``phantom-types``.
-
138
139
Type resolution order
140
---------------------
0 commit comments