Skip to content

Commit 194c8c8

Browse files
committed
Better example
1 parent bcb1790 commit 194c8c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/pages/concept.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ Example:
126126
... def _some_some(instance: Some) -> int:
127127
... return 2
128128
129-
>>> assert some(1) == 2
129+
>>> argument = 1
130+
>>> assert isinstance(argument, Some)
131+
>>> assert some(argument) == 2
130132
131133
.. note::
132134

133135
It is impossible for ``mypy`` to understand that ``1`` has ``Some``
134136
type in this example. Be careful, it might break your code!
135137

136-
Consider that this feature is limited to ``phantom-types``.
137-
138138

139139
Type resolution order
140140
---------------------

0 commit comments

Comments
 (0)