On Tue, Oct 20, 2020 at 06:02 J. Pic <jpic@yourlabs.org> wrote:
Well personally I don't need print at all, I just read code and imagine the output in my head and that's perfectly fine for me (I don't even need a tty).
Nonetheless, I believe the majority of Python users are not necessarily familiar with PDB and would be using print as their main debugging tool, in which case the print statement will not be kept in runtime code in which case parenthesis have a cost but no added value.
At the same time, Guido says he can remove that cost for no extra cost, so there's that: how do we find a good reason to not remove a cost for free ? Sounds like a win/win situation, both for most users and for the new pegparser.
I guess it sounds like getting something good for free, but I think it's really just violating the principle of least astonishment. Sometime, someone is going to ask, "why is this program not printing to stdout?" just like many programmers before have run python -O and didn't read the fine print. I just don't think print is special enough to break the rules. If we want to talk about changing the rules in general, I'd be interested in a tangential discussion of DCE if someone wants to talk about that in another thread.