tuple assign variables

dimitri pater dimitri.pater at gmail.com
Mon Aug 15 09:32:58 EDT 2005


hi,

I'm fond of Greg Stein's dtuple module[1]. I've never used it with
> MySQL, so YMMV, but using it might look something like:


thanks for pointing that out, works like a breeze

self.cursor.execute( "SELECT * FROM customer WHERE name ='sarah'") 
descriptor = dtuple.TupleDescriptor(self.cursor.description) 
for row in (dtuple.DatabaseTuple(descriptor, row) for row in 
self.cursor.fetchall()): 
name, pet, modified = row 


thanks!

-- 
All truth passes through three stages. First, it is ridiculed. Second, it is 
violently opposed. Third, it is accepted as being self-evident.
Arthur Schopenhauer 
-----
Please visit dimitri's website: www.serpia.com <http://www.serpia.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050815/e5890f1a/attachment.html>


More information about the Python-list mailing list