docs: fix reST syntax and whitespace in executemany examples

This commit is contained in:
Daniele Varrazzo 2022-10-20 21:31:18 +02:00
parent aabac5df31
commit f401d0b738
2 changed files with 11 additions and 7 deletions

View File

@ -208,6 +208,8 @@ The ``cursor`` class
Parameters are bounded to the query using the same rules described in
the `~cursor.execute()` method.
.. code:: python
>>> nums = ((1,), (5,), (10,))
>>> cur.executemany("INSERT INTO test (num) VALUES (%s)", nums)

View File

@ -1029,6 +1029,8 @@ parameters. By reducing the number of server roundtrips the performance can be
.. autofunction:: execute_batch
.. code:: python
>>> nums = ((1,), (5,), (10,))
>>> execute_batch(cur, "INSERT INTO test (num) VALUES (%s)", nums)