[issue42624] sqlite3 package document mistake

2020-12-19 Thread LIU Qingyuan


LIU Qingyuan  added the comment:

Python 3.9.1 (default, Dec 11 2020, 14:32:07) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> conn = sqlite3.connect("test.db")
>>> conn.execute("CREATE TABLE test (id INTEGER, str TEXT);")

>>> conn.execute("CREATE TABLE test (id INTEGER, str TEXT);")
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.OperationalError: table test already exists
>>> 


I think the reproduction is way too easy and has nothing special so I didn't 
include one at the very beginning. That's a simple reproduction on interactive 
console.

--

___
Python tracker 
<https://bugs.python.org/issue42624>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42624] sqlite3 package document mistake

2020-12-12 Thread LIU Qingyuan


New submission from LIU Qingyuan :

In the document about sqlite3 package, it was suggested that when users are 
trying to create a table already exists, sqlite3.ProgrammingError is going to 
be thrown. However, the actual exception thrown is sqlite3.OperationalError, 
which is inconsistent with the document.

Doc: https://docs.python.org/3/library/sqlite3.html#exceptions

--
assignee: docs@python
components: Documentation
messages: 382904
nosy: docs@python, seeker-Liu
priority: normal
severity: normal
status: open
title: sqlite3 package document mistake
type: behavior
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue42624>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com