Skip to content

Commit 01c55cd

Browse files
committed
revisited dynamic_typing.rst
Signed-off-by: Oleg Höfling <[email protected]>
1 parent ffbcfec commit 01c55cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/source/dynamic_typing.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ less effective, unless you are careful.
5454
Any vs. object
5555
--------------
5656

57-
The type ``object`` is another type that can have an instance of arbitrary
58-
type as a value. Unlike ``Any``, ``object`` is an ordinary static type (it
57+
The type :py:class:`object` is another type that can have an instance of arbitrary
58+
type as a value. Unlike ``Any``, :py:class:`object` is an ordinary static type (it
5959
is similar to ``Object`` in Java), and only operations valid for *all*
60-
types are accepted for ``object`` values. These are all valid:
60+
types are accepted for :py:class:`object` values. These are all valid:
6161

6262
.. code-block:: python
6363
@@ -80,7 +80,7 @@ operations:
8080
n = 1 # type: int
8181
n = o # Error!
8282
83-
You can use ``cast()`` (see chapter :ref:`casts`) or ``isinstance`` to
84-
go from a general type such as ``object`` to a more specific
85-
type (subtype) such as ``int``. ``cast()`` is not needed with
83+
You can use :py:func:`~typing.cast` (see chapter :ref:`casts`) or :py:func:`isinstance` to
84+
go from a general type such as :py:class:`object` to a more specific
85+
type (subtype) such as ``int``. :py:func:`~typing.cast` is not needed with
8686
dynamically typed values (values with type ``Any``).

0 commit comments

Comments
 (0)