Re: I wish that [].append(x) returned [x]

2007-05-03 Thread Carsten Haese
On Wed, 2007-05-02 at 13:45 -0800, Joshua J. Kugler wrote: On Wednesday 02 May 2007 12:05, Tobiah wrote: In addition to the above good advice, in case you are submitting a query to a DB-API compliant SQL database, you should use query parameters instead of building the query with

Re: I wish that [].append(x) returned [x]

2007-05-02 Thread Tobiah
In addition to the above good advice, in case you are submitting a query to a DB-API compliant SQL database, you should use query parameters instead of building the query with string substitution. I tried that a long time ago, but I guess I found it to be more awkward. I imagine that it is

Re: I wish that [].append(x) returned [x]

2007-05-02 Thread Jean-Paul Calderone
On Wed, 02 May 2007 13:05:08 -0700, Tobiah [EMAIL PROTECTED] wrote: In addition to the above good advice, in case you are submitting a query to a DB-API compliant SQL database, you should use query parameters instead of building the query with string substitution. I tried that a long time

Re: I wish that [].append(x) returned [x]

2007-05-02 Thread Joshua J. Kugler
On Wednesday 02 May 2007 12:05, Tobiah wrote: In addition to the above good advice, in case you are submitting a query to a DB-API compliant SQL database, you should use query parameters instead of building the query with string substitution. I tried that a long time ago, but I guess I

I wish that [].append(x) returned [x]

2007-05-01 Thread Tobiah
I wanted to do: query = query text % tuple(rec[1:-1].append(extra)) but the append() method returns none, so I did this: fields = rec[1:-1] fields.append(extra) query = query text % tuple(fields) -- Posted via a free Usenet account from http://www.teranews.com

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Rob Wolfe
Tobiah [EMAIL PROTECTED] writes: I wanted to do: query = query text % tuple(rec[1:-1].append(extra)) but the append() method returns none, so I did this: fields = rec[1:-1] fields.append(extra) query = query text % tuple(fields) What about this? query =

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Paul McGuire
On May 1, 3:45 pm, Tobiah [EMAIL PROTECTED] wrote: I wanted to do: query = query text % tuple(rec[1:-1].append(extra)) but the append() method returns none, so I did this: fields = rec[1:-1] fields.append(extra) query = query text % tuple(fields) --

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Carsten Haese
On Tue, 2007-05-01 at 14:00 -0700, Paul McGuire wrote: On May 1, 3:45 pm, Tobiah [EMAIL PROTECTED] wrote: I wanted to do: query = query text % tuple(rec[1:-1].append(extra)) but the append() method returns none, so I did this: fields = rec[1:-1]

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Michael Bentley
On May 1, 2007, at 3:45 PM, Tobiah wrote: I wanted to do: query = query text % tuple() but the append() method returns none, so I did this: fields = rec[1:-1] fields.append(extra) query = query text % tuple(fields) As you learned. .append() adds to an existing