homepage

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.

classification
Title: 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax.
Type: behavior Stage:
Components: Documentation Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BreamoreBoy, docs@python, terry.reedy
Priority: normal Keywords:

Created on 2009年01月19日 23:15 by terry.reedy, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (3)
msg80218 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2009年01月19日 23:15
1. Several examples start with
>>> from pysqlite2 import dbapi2 as sqlite3
Traceback (most recent call last):
 File "<pyshell#23>", line 1, in <module>
 from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
I presume that should be just 'import sqlite3'.
2. Print statements need conversion and future import deleted (2to3?).
3. Cut and paste crashes due to 'bad' blank line. For instance,
# A minimal SQLite shell for experiments
...
>>> while True:
... line = raw_input()
... if line == "":
... break
... buffer += line
... if sqlite3.complete_statement(buffer):
... try:
... buffer = buffer.strip()
... cur.execute(buffer)
...
 File "<stdin>", line 10
 ^
IndentationError: unexpected unindent
>>> if buffer.lstrip().upper().startswith("SELECT"):
 File "<stdin>", line 1
 if buffer.lstrip().upper().startswith("SELECT"):
 ^
IndentationError: unexpected indent
msg108203 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010年06月19日 18:45
I'm guessing that this is fixed and hence can be closed as google didn't throw anything obvious at me, am I correct?
msg108207 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010年06月19日 19:59
This issue is about the examples in 
11.6.1. Module functions and constants.
All 3 points are fixed.
The indentation issue seems to have been fixed by making the blank line completely blank with no spaces. I would have removed it, but cut and paste now works.
I have no idea what Google has to do with this, but thanks for pinging it.
History
Date User Action Args
2022年04月11日 14:56:44adminsetgithub: 49255
2010年06月19日 19:59:22terry.reedysetstatus: open -> closed

type: behavior
assignee: docs@python
components: + Documentation
versions: + Python 3.1
nosy: + docs@python

messages: + msg108207
resolution: fixed
2010年06月19日 18:45:24BreamoreBoysetnosy: + BreamoreBoy
messages: + msg108203
2009年01月20日 03:07:14terry.reedysettitle: 3.0 sqlite doc: most refers to pysqlite2, use 2.x syntax. -> 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax.
2009年01月19日 23:15:10terry.reedycreate

AltStyle によって変換されたページ (->オリジナル) /