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/056058.html below:

[Python-Dev] Replacement for print in Python 3.0

[Python-Dev] Replacement for print in Python 3.0Steven Bethard steven.bethard at gmail.com
Fri Sep 2 17:18:00 CEST 2005
skip at pobox.com wrote:
> 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)

Sorry, I missed the newline-suppression idea in my first reply.  I
think the rule above is too confusing.  I'm also still not convinced
that the print function needs to support newline-suppression.  Since
the print function seems to be intended mainly for newbies and simple
debugging, I'm having trouble coming up with examples where this is
really necessary.  I'd like to see a few examples where it's crucial
that the final newline is suppressed.

If it *has* to be supported, I'd add it as a keyword argument, so that
your example above reads like:

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

I guess that's not too bad actually.  Kinda nice that it has to be the
last thing in the function...

STeVe
-- 
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy
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