Interesting Python

From PeformIQ Upgrade
Revision as of 14:44, 20 December 2007 by PeterHarding (talk | contribs) (New page: = Some Twity Code = <nowiki> def insert(self, row): field_values = ", ".join(['%s="%%(%s)s"' % (f, f) for f in self.field_names </nowiki> <nowiki> return [self.syn_record...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Some Twity Code

def insert(self, row): field_values = ", ".join(['%s="%%(%s)s"' % (f, f) for f in self.field_names

return [self.syn_record_class(list(r) + [s[1](self.record_class(r)) for s in self.syn_fields]) for r in c.fetchall()]