8000 Clarify that implicit transaction control happens in the same commit(… · python/cpython@cb36419 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb36419

Browse files
committed
Clarify that implicit transaction control happens in the same commit()/rollback()/close() call
1 parent b2ddf33 commit cb36419

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Doc/library/sqlite3.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -637,24 +637,24 @@ Connection objects
637637
Commit any open transaction to the database.
638638
If :attr:`autocommit` is ``True``, or there is no open transaction,
639639
this method does nothing.
640-
If :attr:`!autocommit` is ``False``, a new transaction is implicitly
641-
opened if an open transaction was committed by this method.
640+
If :attr:`!autocommit` is ``False``, this method implicitly opens
641+
a new transaction after committing an open transaction.
642642

643643
.. method:: rollback()
644644

645645
Roll back to the start of any open transaction.
646646
If :attr:`autocommit` is ``True``, or there is no open transaction,
647647
this method does nothing.
648-
If :attr:`!autocommit` is ``False``, a new transaction is implicitly
649-
opened if an open transaction was rolled back by this method.
648+
If :attr:`!autocommit` is ``False``, this method implicitly opens
649+
a new transaction after committing.
650650

651651
.. method:: close()
652652

653653
Close the database connection.
654-
If :attr:`autocommit` is ``False``,
655-
any open transaction is implicitly rolled back.
654+
If :attr:` 5E2A autocommit` is ``False``, this method implicitly rolls back
655+
any open transaction before closing.
656656
If :attr:`!autocommit` is ``True`` or :data:`LEGACY_TRANSACTION_CONTROL`,
657-
no implicit transaction control is executed.
657+
this method does not execute any implicit transaction control.
658658
Make sure to :meth:`commit` before closing
659659
to avoid losing pending changes.
660660

0 commit comments

Comments
 (0)
0