[Python-checkins] cpython (merge 3.2 -> default): Merge #15742: clarify sqlite parameter substitution example.

r.david.murray python-checkins at python.org
Mon Aug 20 20:18:04 CEST 2012


http://hg.python.org/cpython/rev/2eafe04cb6ed
changeset:   78680:2eafe04cb6ed
parent:      78678:7789111afe05
parent:      78679:80b15cf2611e
user:        R David Murray <rdmurray at bitdance.com>
date:        Mon Aug 20 14:14:46 2012 -0400
summary:
  Merge #15742: clarify sqlite parameter substitution example.

Suggestion and patch by Mike Hoy.

files:
  Doc/library/sqlite3.rst |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -60,7 +60,7 @@
    c.execute("select * from stocks where symbol = '%s'" % symbol)
 
    # Do this instead
-   t = (symbol,)
+   t = ('IBM',)
    c.execute('select * from stocks where symbol=?', t)
 
    # Larger example

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list