mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)
Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
This commit is contained in:
parent
1317b70f89
commit
29afb7d2ef
5 changed files with 349 additions and 16 deletions
|
@ -1051,9 +1051,10 @@ Blob Objects
|
|||
|
||||
.. class:: Blob
|
||||
|
||||
A :class:`Blob` instance is a :term:`file-like object` that can read and write
|
||||
data in an SQLite :abbr:`BLOB (Binary Large OBject)`. Call ``len(blob)`` to
|
||||
get the size (number of bytes) of the blob.
|
||||
A :class:`Blob` instance is a :term:`file-like object`
|
||||
that can read and write data in an SQLite :abbr:`BLOB (Binary Large OBject)`.
|
||||
Call :func:`len(blob) <len>` to get the size (number of bytes) of the blob.
|
||||
Use indices and :term:`slices <slice>` for direct access to the blob data.
|
||||
|
||||
Use the :class:`Blob` as a :term:`context manager` to ensure that the blob
|
||||
handle is closed after use.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue