Skip to content

Commit 86c77c1

Browse files
Fix README for PyPI
1 parent 158df65 commit 86c77c1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ user-defined type:
9191
9292
9393
While this example works for serializing ``Person``, we won't be able to
94-
serialize a :class:`list` of ``Person`` because the implementation of
95-
``to_json`` for :class:`list` won't call ``to_json_person``.
94+
serialize a ``list`` of ``Person`` because the implementation of ``to_json``
95+
for ``list`` won't call ``to_json_person``.
9696

9797

9898
Type Classes
@@ -131,7 +131,7 @@ Tutorial
131131

132132
How can we replicate type classes in Python?
133133

134-
Decorate a method signature with a call to :func:`typeclass`, giving it the
134+
Decorate a method signature with a call to ``typeclass``, giving it the
135135
name of a type variable. The decorator will check the signature to make sure
136136
that the type variable appears at least once in the type annotations of the
137137
parameters. Unlike Haskell, Python cannot infer the *return type* at a call
@@ -146,12 +146,11 @@ site, so that path to instance discovery is impossible; the type variable
146146
"""Serialize a value to JSON."""
147147
148148
We may optionally provide a default implementation. If we do not, the
149-
default behavior is to raise a :class:`NotImplementedError` diagnosing
149+
default behavior is to raise a ``NotImplementedError`` diagnosing
150150
a missing instance for the specific type variable.
151151

152-
The :func:`typeclass` decorator will add an :func:`instance` attribute to the
153-
method. Use that to decorate monomorphic implementations, giving it the type
154-
argument:
152+
The ``typeclass`` decorator will add an ``instance`` attribute to the method.
153+
Use that to decorate monomorphic implementations, giving it the type argument:
155154

156155
.. code-block:: python
157156

0 commit comments

Comments
 (0)