This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients Nebelhom, docs@python, eric.araujo, fdrake, ghaering, petri.lehtinen
Date 2011-11-28.15:04:07
SpamBayes Score 3.4698096e-06
Marked as misclassified No
Message-id <1322492648.72.0.621901435496.issue13491@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-11-28 15:04:08eric.araujosetrecipients: + eric.araujo, fdrake, ghaering, docs@python, petri.lehtinen, Nebelhom
2011-11-28 15:04:08eric.araujosetmessageid: <1322492648.72.0.621901435496.issue13491@psf.upfronthosting.co.za>
2011-11-28 15:04:08eric.araujolinkissue13491 messages
2011-11-28 15:04:07eric.araujocreate