On Tuesday, June 26, 2012 1:34:03 AM UTC-5, Stefan Behnel wrote:
> First of all, the statement has a rather special syntax that is not obvious
> and practically non-extensible. It also has hidden semantics that are hard
> to explain and mixes formatting with output - soft-space, anyone?
>
> The function is straight forward, configurable, does one thing, works with
> help() and doesn't get in the way. And something as rarely[1] used as a
> print simply doesn't deserve special syntax. Oh, and, yes, you can even
> pass it into some code as callback, although I rarely had a need for that.
>
> Stefan
>
>
> [1] Seriously, it's not very helpful in interactive mode and too simplistic
> to be used in application code. Even scripts often work better with logging
> than with prints.
Unfortunately, even though "print" is supposedly only used by the neophytes,
the python<3.0 stdlib is full of print statements. For instance, out of 3173
files, 986 contained the word "print"[1]. Heck just in the Lib folder alone
(without recusing down sub directories) there are 1352 instances of "print" in
a "py" file!
Naive Nancy Mused: "If only neophtes use print, and the Python Lib is full of
prints statements, then the python developers must be...OH DEAR GAWD!"
[1] of course that is when using `filestr.count("print")` -- I assume that the
word "print" is not used excessively in comments or docstrings. Someone else
can do a less naive search if they like.
--
http://mail.python.org/mailman/listinfo/python-list