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

[Python-Dev] Replacement for print in Python 3.0

[Python-Dev] Replacement for print in Python 3.0Guido van Rossum guido at python.org
Tue Sep 6 06:46:04 CEST 2005
On 9/5/05, Calvin Spealman <ironfroggy at gmail.com> wrote:
> There is a lot of debate over this issue, obviously. Now, I think
> getting rid of the print statement can lead to ugly code, because a
> write function would be called as an expression, so where we'd once
> have prints on their own lines, that wouldn't be the case anymore, and
> things could get ugly.

Sounds like FUD to me. Lots of functions/methods exist that *could* be
embedded in expressions, and never are. Or if they are, there's
actually a good reason, and then being a mere function (instead of a
statement) would actually be helpful. Anyway, why would it be
important that prints are on their own line where so many other
important actions don't have that privilege?

> But, print is a little too inflexible.
> What about adding a special name __print__, which the print statement
> would call? It should be looked up as a local first, then global.
> Thus, different parts of a program can define their own __print__,
> without changing everyone else's stdout. The Python web people would
> love that.

Too many underscores; __print__ screams "internal use, don't mess" at you.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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