On Wed, Dec 20, 2006 at 07:00:38AM -0800, Ant wrote:
> 
> 
> On Dec 20, 5:20 am, Andrew Sackville-West <[EMAIL PROTECTED]>
> wrote:
> > > >>> values = ", ".join([escapeAndQuote(f[:-2]) for f in fields])
> 
> Obviously this is the appropriate choice since this is a database app.
> In general the strip() group of string methods do what you want in a
> safe way - assuming you don't care about whitespace:
> 
> >>> s = "   test   \r\n"
> >>> s.strip()
> 'test'

perfect!

[...]
> 
> This way it doesn't matter what your line endings are -  you won't be
> surprised by missing characters if the data dump changes for any
> reason.

well, no great chance of the data dump changing, but its a good
point. 

thanks
A

Attachment: signature.asc
Description: Digital signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to