Visitar URL original
gh-89018: Improve documentation of `sqlite3` exceptions by erlend-aasland · Pull Request #27645 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reword Waning
  • Loading branch information
erlend-aasland committed Jun 1, 2022
commit 59dcdbda7bdd0f64b2685dd544dddaeb1e44f6fd
6 changes: 4 additions & 2 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ Cursor Objects
:ref:`placeholders <sqlite3-placeholders>`.

:meth:`execute` will only execute a single SQL statement. If you try to execute
more than one statement with it, it will raise a :exc:`.Warning`. Use
more than one statement with it, it will raise a :exc:`ProgrammingError`. Use
:meth:`executescript` if you want to execute multiple SQL statements with one
call.

Expand Down Expand Up @@ -1102,7 +1102,9 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`).

.. exception:: Warning

This exception is not raised by ``sqlite3``.
This exception is not currently raised by the ``sqlite3`` module,
but may be raised by applications using ``sqlite3``,
for example if a user-defined function trunkates data while inserting.
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
``Warning`` is a subclass of :exc:`Exception`.

.. exception:: Error
Expand Down