how do i map this?
John Machin
sjmachin at lexicon.net
Sun Nov 12 23:55:08 EST 2006
Ben Finney wrote:
> "ronrsr" <ronrsr at gmail.com> writes:
>
> > #row is a dictionary with keys: zid, keywords, citation, quotation
> > def print_row(row):
> > print """<tr>
> > <td class="pad">%(keywords)s
> > </td>
> > <td class="pad">%(quotation)s
> > </td>
> > <td class="pad">%(citation)s
> > </td>
> > <td class="pad" align="center"><form action="update.py"
> > name="updateform" enctype="application/x-www-form-urlencoded"
> > method="GET"><input type="hidden" name="zid" value="%(zid)d"><input
> > type="submit" value="Edit"></form>
> > </td>
> > </tr>
> > """
>
> You're printing a string, and never using that 'row' parameter.
If that is so, why is he getting that message "TypeError: format
requires a mapping"?
More information about the Python-list
mailing list