Linux.com: Python 3 makes a big break

Aahz aahz at pythoncraft.com
Sun Oct 19 10:44:52 EDT 2008


In article <gdeof0$d3b$3 at lust.ihug.co.nz>,
Lawrence D'Oliveiro  <ldo at geek-central.gen.new_zealand> wrote:
>In message
><deb99bf0-c418-4f18-823a-8b9f2e4c5cc0 at g61g2000hsf.googlegroups.com>, Kay
>Schluehr wrote:
>>
>> If someone had solved the hard problem of finding a less
>> cumbersome way of writing sys.stdout.write(...) ...
>
>I don't see what the big deal is. I regularly write things like
>
>   sys.stdout.write \
>      (
>            "<INPUT TYPE=\"RADIO\" NAME=\"%(name)s\""
>            " ID=\"%(name)s[%(value)s]\" VALUE=\"%(value)s\"%(checked)s>"
>            "<LABEL FOR=\"%(name)s[%(value)s]\">%(title)s</LABEL>\n"
>              # using LABEL lets user click on text to select button
>        %
>          {
>            "name" : EscapeHTML(Name),
>            "value" : EscapeHTML(Value),
>            "title" : Title,
>            "checked" : ("", " CHECKED")[Checked],
>          }
>      )

Why are you using a backslash?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

import antigravity



More information about the Python-list mailing list