A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/007194.html below:

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

[Python-Dev] extended print statement, uPre-PEPBarry 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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4