3 ms·
Here’s a good overview of the details between the two: https://snarky.ca/why-print-became-a-function-in-python-3/ https://snarky.ca/why-print-became-a-function-
by Waterluvian 4y ago
Here’s a good overview of the details between the two: https://snarky.ca/why-print-became-a-function-in-python-3/ https://snarky.ca/why-print-became-a-function-in-python-3/
“Why don’t we just keep both?” probably has many answers. The overwhelming one for me is that if everyone’s doing the same thing two ways, then everyone has to learn all the esoterics about the print statement.
“Why don’t you just do it for me?” is a cardinal sin for a runtime. And already exists in migration tools.
- mattgreenrocks 4y agoBeing able to use it in higher-order functions is somewhat un-Pythonic but I can accept that as a reasonable use for it. Would still prefer that print the statement is deprecated but usable.
- whimsicalism 4y agoI think composition is becoming increasingly more within pythonic idioms... it is well suited towards pythons usage as a high-level controller around low level libraries in other languages. see also: the recent addition of match semantics in python