mirror of
https://github.com/python/cpython.git
synced 2025-10-03 21:55:41 +00:00
Doc: Use consistent markup for example Point class in sqlite3 (GH-96095)
(cherry picked from commit 303ef0913e
)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
eed7711547
commit
f21d7e5150
1 changed files with 3 additions and 3 deletions
|
@ -1571,7 +1571,7 @@ registering custom adapter functions.
|
|||
Letting your object adapt itself
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
Suppose we have a ``Point`` class that represents a pair of coordinates,
|
||||
Suppose we have a :class:`!Point` class that represents a pair of coordinates,
|
||||
``x`` and ``y``, in a Cartesian coordinate system.
|
||||
The coordinate pair will be stored as a text string in the database,
|
||||
using a semicolon to separate the coordinates.
|
||||
|
@ -1602,11 +1602,11 @@ values.
|
|||
To be able to convert *from* SQLite values *to* custom Python types,
|
||||
we use *converters*.
|
||||
|
||||
Let's go back to the :class:`Point` class. We stored the x and y coordinates
|
||||
Let's go back to the :class:`!Point` class. We stored the x and y coordinates
|
||||
separated via semicolons as strings in SQLite.
|
||||
|
||||
First, we'll define a converter function that accepts the string as a parameter
|
||||
and constructs a :class:`Point` object from it.
|
||||
and constructs a :class:`!Point` object from it.
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue