Difference between revisions of "Interesting Python"
Jump to navigation
Jump to search
PeterHarding (talk | contribs) |
PeterHarding (talk | contribs) |
||
Line 12: | Line 12: | ||
for r in c.fetchall()] | for r in c.fetchall()] | ||
</pre> | </pre> | ||
=Some Manuals= | |||
* http://www.python.org/doc/2.5.1/modindex.html | |||
[[Category:Python]] | [[Category:Python]] |
Revision as of 09:48, 10 May 2008
Some Twisty Code
field_values = ", ".join(['%s="%%(%s)s"' % (f, f) for f in self.field_names if f != self.primary_key_name])
return [self.syn_record_class(list(r) + [s[1](self.record_class(r)) for s in self.syn_fields]) for r in c.fetchall()]