Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64555 > unrolled thread
| Started by | lgabiot <lgabiot@hotmail.com> |
|---|---|
| First post | 2014-01-23 03:32 +0100 |
| Last post | 2014-01-23 18:47 +1100 |
| Articles | 3 on this page of 23 — 9 participants |
Back to article view | Back to comp.lang.python
problem with sqlite3: cannot use < in a SQL query with (?) lgabiot <lgabiot@hotmail.com> - 2014-01-23 03:32 +0100
Re: problem with sqlite3: cannot use < in a SQL query with (?) lgabiot <lgabiot@hotmail.com> - 2014-01-23 03:34 +0100
Re: problem with sqlite3: cannot use < in a SQL query with (?) Chris Angelico <rosuav@gmail.com> - 2014-01-23 13:42 +1100
Re: problem with sqlite3: cannot use < in a SQL query with (?) bob gailer <bgailer@gmail.com> - 2014-01-22 21:51 -0500
Re: problem with sqlite3: cannot use < in a SQL query with (?) bob gailer <bgailer@gmail.com> - 2014-01-22 21:51 -0500
Re: problem with sqlite3: cannot use < in a SQL query with (?) Tim Chase <python.list@tim.thechases.com> - 2014-01-22 21:05 -0600
sqlite3 docbug (was problem with sqlite3) Rustom Mody <rustompmody@gmail.com> - 2014-01-22 20:33 -0800
Re: sqlite3 docbug (was problem with sqlite3) Rustom Mody <rustompmody@gmail.com> - 2014-01-22 20:37 -0800
Re: sqlite3 docbug (was problem with sqlite3) Chris Angelico <rosuav@gmail.com> - 2014-01-23 15:41 +1100
Re: sqlite3 docbug (was problem with sqlite3) Rustom Mody <rustompmody@gmail.com> - 2014-01-22 21:35 -0800
Re: sqlite3 docbug (was problem with sqlite3) Chris Angelico <rosuav@gmail.com> - 2014-01-23 16:42 +1100
Re: sqlite3 docbug (was problem with sqlite3) lgabiot <lgabiot@hotmail.com> - 2014-01-23 08:37 +0100
Re: sqlite3 docbug (was problem with sqlite3) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-23 09:04 +0000
Re: sqlite3 docbug (was problem with sqlite3) lgabiot <lgabiot@hotmail.com> - 2014-01-23 10:45 +0100
Re: sqlite3 docbug (was problem with sqlite3) Rustom Mody <rustompmody@gmail.com> - 2014-01-23 02:23 -0800
Re: sqlite3 docbug (was problem with sqlite3) lgabiot <laurent.gabiot@gmail.com> - 2014-01-23 10:45 +0100
Re: sqlite3 docbug (was problem with sqlite3) lgabiot <laurent.gabiot@gmail.com> - 2014-01-23 08:37 +0100
Re: sqlite3 docbug (was problem with sqlite3) Terry Reedy <tjreedy@udel.edu> - 2014-01-23 05:43 -0500
Re: sqlite3 docbug (was problem with sqlite3) Rustom Mody <rustompmody@gmail.com> - 2014-01-23 07:00 -0800
Re: sqlite3 docbug (was problem with sqlite3) Tim Chase <python.list@tim.thechases.com> - 2014-01-23 06:36 -0600
Re: sqlite3 docbug (was problem with sqlite3) Terry Reedy <tjreedy@udel.edu> - 2014-01-23 20:03 -0500
Re: sqlite3 docbug (was problem with sqlite3) Asaf Las <roegltd@gmail.com> - 2014-01-22 23:18 -0800
Re: sqlite3 docbug (was problem with sqlite3) Chris Angelico <rosuav@gmail.com> - 2014-01-23 18:47 +1100
Page 2 of 2 — ← Prev page 1 [2]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-01-23 20:03 -0500 |
| Subject | Re: sqlite3 docbug (was problem with sqlite3) |
| Message-ID | <mailman.5920.1390525506.18130.python-list@python.org> |
| In reply to | #64571 |
On 1/23/2014 7:36 AM, Tim Chase wrote: > On 2014-01-23 05:43, Terry Reedy wrote: >> A list instead of a tuple does work, but not an iterable, so >> 'sequence'. > > In the OP's case using sqlite drivers, this is true. However, I > maintain some old 2.4 code that uses a correspondingly ancient version > of mx.ODBC which requires a tuple and raises an exception on any other > iterable. So I always use a tuple out of habit, even if it would be > easier to just use some other iterable. I would check 2.7 behavior before changing the 2.7 doc. -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Asaf Las <roegltd@gmail.com> |
|---|---|
| Date | 2014-01-22 23:18 -0800 |
| Subject | Re: sqlite3 docbug (was problem with sqlite3) |
| Message-ID | <408998ad-918d-454c-b37e-41921cdd0e3d@googlegroups.com> |
| In reply to | #64569 |
On Thursday, January 23, 2014 6:41:42 AM UTC+2, Chris Angelico wrote:
> On Thu, Jan 23, 2014 at 3:33 PM, Rustom Mody <r...@gmail.com> wrote:
> I think it's fairly clear from the example that it has to be either a
> tuple or a dict. Looks fine to me. But I'm sure that, if you come up
> with better wording, a tracker issue would get the attention it
> deserves.
> ChrisA
It looks like tuple, but i could be wrong:
from python-3.3.3.tar.bz2\Python-3.3.3\Modules\_sqlite\cursor.c
PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args)
{
...
if (multiple) {
/* executemany() */
if (!PyArg_ParseTuple(args, "OO", &operation, &second_argument)) {
goto error;
}
/Asaf
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-01-23 18:47 +1100 |
| Subject | Re: sqlite3 docbug (was problem with sqlite3) |
| Message-ID | <mailman.5875.1390463259.18130.python-list@python.org> |
| In reply to | #64574 |
On Thu, Jan 23, 2014 at 6:18 PM, Asaf Las <roegltd@gmail.com> wrote:
> if (!PyArg_ParseTuple(args, "OO", &operation, &second_argument)) {
> goto error;
> }
That part just asks for "any object" as the second argument. Also,
that part is handling executemany(). Later on, the execute() handler
looks for an optional second arg, and then looks for an iterator from
it.
But as a general rule, I'd advise reading the docs rather than the
source, unless you're trying to figure out whether some other iterable
will work. For the most part, just follow the examples and use a
tuple.
ChrisA
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.python
csiph-web