[Python-Dev] extended print statement, uPre-PEP

Barry A. Warsaw bwarsaw@beopen.com
Sun, 23 Jul 2000 23:21:59 -0400 (EDT)


>>>>> "TP" == Tim Peters <tim_one@email.msn.com> writes:

    | [Paul]
    | log.writeln($"post to ${listname} from ${sender}, size=${len(msg)}")

    TP> where I've put back the comma from Barry's original.  Perhaps
    TP> Barry will counter with

    | print >> log, $"post to ${listname} from ${sender}, size=${len(msg)}"

Actually, I'd counter with something quite similar, but much more Pythonic.

    print >> log, 'post to %(listname)s from %(sender)s, size=%(msglen)s' % {
	'listname': listname,
	'sender'  : sender,
	'msglen'  : len(msg),
	}

variants of which I use all the time!

    TP> But there's not a new suggestion in this whole thing -- even
    TP> ">>" specifically was suggested long ago for this purpose.

:)

-Barry