File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ Tutorial example
15
15
-------------------
16
16
17
17
Here is a simple ``mypkg `` package that specifies one namespace
18
- and exports two objects imported from different modules::
18
+ and exports two objects imported from different modules:
19
19
20
+ .. code-block :: python
20
21
21
22
# mypkg/__init__.py
22
23
import apipkg
@@ -37,7 +38,9 @@ regular Python package.
37
38
Namespace dictionaries contain `` name: value`` mappings
38
39
where the value may be another namespace dictionary or
39
40
a string specifying an import location. On accessing
40
- an namespace attribute an import will be performed::
41
+ an namespace attribute an import will be performed:
42
+
43
+ .. code- block:: pycon
41
44
42
45
>> > import mypkg
43
46
>> > mypkg.path
@@ -55,7 +58,9 @@ loaded when they are accessed. This means:
55
58
* only the root " mypkg" ever needs to be imported to get
56
59
access to the complete functionality
57
60
58
- * the underlying modules are also accessible, for example::
61
+ * the underlying modules are also accessible, for example:
62
+
63
+ .. code- block:: python
59
64
60
65
from mypkg.sub import Class1
61
66
You can’t perform that action at this time.
0 commit comments