Easy "here documents" ??
Fredrik Lundh
fredrik at pythonware.com
Mon Dec 20 01:36:56 EST 2004
Jim Hill wrote:
>>And if you prefer not to type so much:
>>
>>def I(*args): return "".join(map(str, args))
>>def F(v, fmt): return ("%" + fmt) % v
>
> Not that I don't appreciate the suggestions from masters of the Python
> universe, but the reason I'm switching to Python from Perl is for the
> readability. What you fells are suggesting might as well be riddled
> with dollar signs and semicolons... <emoticon>.
the I and F functions? add newlines to them, and replace that ugly-but-
generally-accepted "".join thing with a proper string.join call, split the
second expression into two subexpressions if necessary, and they'll
look a lot better.
or did you mean the call to I? did you look at it in a syntax-coloring
editor?
</F>
More information about the Python-list
mailing list