[docs] [issue13491] Fixes for sqlite3 doc

Éric Araujo report at bugs.python.org
Mon Nov 28 16:04:08 CET 2011


Éric Araujo <merwok at netwok.org> added the comment:

It is very helpful that you review the docs.  Some obvious fixes were made when moving to Python 3 (print, etc.) but apparently the examples were not run.  Sphinx can let us run the code blocks in reST files as doctests, but it is currently not done because the docs are built with a Python 2 version.

I have reviewed your patch on our code review tool; I did not check your message (a patch is much easier :).

> I feel these should be standalone examples out of the box. the sqlite3 includes have a
> "createdb.py" file which would create the tables but it is not referenced in the
> documenta[tion]. I do not know the reasoning behind this, but I would like to have standalone
> examples in these cases.

I think the examples do not stand alone because their author wanted to create and populate a database with many entries, to demonstrate querying, and it was easier to write one script once than to either clutter the examples with long table creation code or having examples with so few rows that it would not be realistic/interesting.  To help people wanting to run the examples in the docs, we could explain that createdb.py needs to be run first.

The createdb script and other sqlite3 doc examples were added when sqlite3 was added in Python 2.5; I’m adding the module author and then-doc lead (hi Gerhard and Fred), maybe they can shed more light on this.

----------
nosy: +eric.araujo, fdrake, ghaering, petri.lehtinen
title: sqlite3 code adjustments -> Fixes for sqlite3 doc
versions: +Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13491>
_______________________________________


More information about the docs mailing list