8000 gh-95273: Improve sqlite3.complete_statement docs by erlend-aasland · Pull Request #95840 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95273: Improve sqlite3.complete_statement docs #95840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
Address review: add trivial example
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
  • Loading branch information
Erlend E. Aasland and CAM-Gerlach authored Aug 11, 2022
commit e6122892c6496ad30e96e17d42eb9e717aa74375
9 changes: 8 additions & 1 deletion Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,14 @@ Module functions
to determine if the entered text seems to form a complete SQL statement,
or if additional input is needed before calling :meth:`~Cursor.execute`.

See :source:`Lib/sqlite3/__main__.py` for example use.
For example::

>>> sqlite3.complete_statement('SELECT foo FROM bar;')
True
>>> sqlite3.complete_statement('SELECT foo')
False

See :source:`Lib/sqlite3/__main__.py` for a more complete real-world use.

.. function:: enable_callback_tracebacks(flag, /)

Expand Down
0