Skip to content

Commit 1f99b63

Browse files
Merge pull request #35 from hugovk/patch-1
Add syntax highlighting to README
2 parents b0d2f01 + a5f1558 commit 1f99b63

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ Tutorial example
1515
-------------------
1616

1717
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:
1919

20+
.. code-block:: python
2021
2122
# mypkg/__init__.py
2223
import apipkg
@@ -37,7 +38,9 @@ regular Python package.
3738
Namespace dictionaries contain ``name: value`` mappings
3839
where the value may be another namespace dictionary or
3940
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
4144
4245
>>> import mypkg
4346
>>> mypkg.path
@@ -55,7 +58,9 @@ loaded when they are accessed. This means:
5558
* only the root "mypkg" ever needs to be imported to get
5659
access to the complete functionality
5760
58-
* the underlying modules are also accessible, for example::
61+
* the underlying modules are also accessible, for example:
62+
63+
.. code-block:: python
5964
6065
from mypkg.sub import Class1
6166

0 commit comments

Comments
 (0)