File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,10 @@ less effective, unless you are careful.
54
54
Any vs. object
55
55
--------------
56
56
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
59
59
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:
61
61
62
62
.. code-block :: python
63
63
@@ -80,7 +80,7 @@ operations:
80
80
n = 1 # type: int
81
81
n = o # Error!
82
82
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
86
86
dynamically typed values (values with type ``Any ``).
You can’t perform that action at this time.
0 commit comments