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/2005-September/056054.html below:

[Python-Dev] Replacement for print in Python 3.0

[Python-Dev] Replacement for print in Python 3.0 [Python-Dev] Replacement for print in Python 3.0skip@pobox.com skip at pobox.com
Fri Sep 2 16:59:28 CEST 2005
    Charles> Or the user can just use stdout.write and have full control.

Don't forget that those of us who are arguing in favor of keeping print are
fully aware of stream.write's existence.  It's just that in the common case
the print statement is more convenient.  Maybe a print builtin wouldn't kill
me.  In that case I'd want both output redirection and newline suppression
though.  I guess you'd have to use a keyword arg to specify an alternate
stream.  Perhaps if the last non-keyword argument was exactly one space, the
newline could be suppressed, e.g.:

    print("foo", "bar", "baz", " ", stream=sys.stderr)

That seems a bit like magic, but probably no less magic than the current
trailing comma.

Skip
More information about the Python-Dev mailing list

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