8000 gh-96414: Inline code examples in sqlite3 docs by erlend-aasland · Pull Request #96442 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-96414: Inline code examples in sqlite3 docs #96442

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 15 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
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
Inline function example
  • Loading branch information
erlend-aasland committed Aug 30, 2022
commit 0f01571bd2de79fb4fa60a5a0691219686220520
13 changes: 0 additions & 13 deletions Doc/includes/sqlite3/md5func.py

This file was deleted.

11 changes: 10 additions & 1 deletion Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,16 @@ Connection objects

Example:

.. literalinclude:: ../includes/sqlite3/md5func.py
.. doctest::

>>> import hashlib
>>> def md5sum(t):
... return hashlib.md5(t).hexdigest()
>>> con = sqlite3.connect(":memory:")
>>> con.create_function("md5", 1, md5sum)
>>> for row in con.execute("select md5(?)", (b"foo",)):
... print(row)
('acbd18db4cc2f85cedef654fccc4a4d8',)


.. method:: create_aggregate(name, /, n_arg, aggregate_class)
Expand Down
0