[New-bugs-announce] [issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug

Matthew Woodcraft report at bugs.python.org
Sat Feb 11 21:16:17 CET 2012

New submission from Matthew Woodcraft <matthew at woodcraft.me.uk>:

The documentation for the sqlite3 module contains the following statement, under 'Cursor.rowcount':

  For DELETE statements, SQLite reports rowcount as 0 if you make a DELETE FROM table without any condition.

This doesn't happen for me (with sqlite 3.7.9): rowcount returns the correct value in this case.

According to http://www.sqlite.org/lang_delete.html#truncateopt , this was a bug that was fixed in SQLite 3.6.5 (in 2008).

So I think the Python documentation should either omit this paragraph, or else explain that it only applies to older versions of SQLite.

Also, the first example under 'Using shortcut methods' has code to work around this bug, which should perhaps be removed.

assignee: docs at python
components: Documentation
messages: 153136
nosy: docs at python, mattheww
priority: normal
severity: normal
status: open
title: sqlite3 Cursor.rowcount documentation for old sqlite bug

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list