Old Man Yells At Cloud

Pavol Lisy pavol.lisy at gmail.com
Wed Sep 20 00:55:56 EDT 2017


On 9/19/17, Steve D'Aprano <steve+python at pearwood.info> wrote:

[...]

> The point is, we all make the occasional silly error. Doesn't mean we should
> cripple our functions and fill the language with special cases like the
> print
> statement to avoid such rare errors. If print had always been a function,
> and
> someone suggested making it a statement, who would be willing to accept all
> those disadvantages for the sake of saving one character?

I am not going to support print as a statement in this discussion!

But what you are describing is some kind of alternative history which
did not happen.

Question was not about crippling function to statement. (Which function?)

What I mean is that if we like to convince people that it was good
decision then we need to use proper arguments.

For example some others which seems like not so proper to me:

1. "learn-unlearn" argument could be viewed differently from opposite
camp (they need to unlearn statement)
2. "print foo" save more than one character ("print foo ," more than
two characters)
3. "for sake of saving one character"? Could we really simplify
motivation of opposite side to just this? (what about breaking old
code?)

BTW if python would only bring "from __cleverness__ import
print_function" how many people would accept your reasons and use it?
And how many would rewrite old code?

How many people would say something like: "Oh it is cool! Now I could
rewrite my old code and monkey patch print!" ?



More information about the Python-list mailing list