Skip to content

Commit 943f159

Browse files
committed
revisited dynamic_typing.rst
Signed-off-by: Oleg Höfling <oleg.hoefling@gmail.com>
1 parent 6347c08 commit 943f159

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy