3 ms·
I find it challenging to accept the humanity of the person that thought breaking print was a jolly good thing to do.
by rjurney 11y ago
I find it challenging to accept the humanity of the person that thought breaking print was a jolly good thing to do.
- brettcannon 11y agoSee http://www.snarky.ca/why-print-became-a-function-in-python-3 http://www.snarky.ca/why-print-became-a-function-in-python-3 for the reasoning behind making `print` a function.
- sago 11y agoWhen I moved to Py3, it was the thing that got me most often. It was annoying. But three things changed to make that less annoying: 1. I got used to it, fairly quickly. That made me care less. 2. I used print-statement debugging less, and unit tests more. This was a good thing generally. 3. For those times when I did need print to debug, I found I could drop in pprint: import pprint print = pprint.pprint which is very useful. That won me over. I've rarely needed naked print to do anything but quick testing and debugging (because by the time I have a command line script, I want at least to have a -q option, so I need to run output through some kind of proxy function). The standard arguments for print() (i.e. composability, extra arguments), I've not needed, but the ability to replace it, I rely on totally now. Of course, YMMV, this is just my experience.