Ian Bicking wrote: > Which is off-topic here, except to say that a view on the tuple would be > useful in a way that returning a fancy tuple would not, because it could > wrap any DB-API-compliant result set.
A wrapper like that could be built quite generically. Also, better to wrap the whole sequence, I think, rather than each tuple individually: results = tableview(mycursor, 'price', 'upc') for row in results: print row.price, row.upc Something for the itertools module, perhaps? (It would need to be an iterator wrapper, not a sequence wrapper, to work on DB cursors etc.) -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiam! | Christchurch, New Zealand | (I'm not a morning person.) | [EMAIL PROTECTED] +--------------------------------------+ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com