News for hackers. Stuff that matters.
Re:Pip has dropped support for Python 2 by krzyk on Sunday January 24, 2021 @04:08AM (#25890523)
I still can't get why they replaced: `print "abc"` with `print("abc")`.

Python REPL was my go to shell calculator and it is quite elaborate to put the parentheses around what I would like to print, for me that was the main drawback of python3.

But I don't write production code in python, it is used only for small shell scripts, or like calculator.

Re:Pip has dropped support for Python 2 by tephra on Sunday January 24, 2021 @04:18AM (#25890566)
Having print as a function instead as a statement provides flexibility and ease of customizing.

Printing to anything but stdout, printing with a separator, using the end keyword, etc, all became easier.

Re:Pip has dropped support for Python 2 by HDevo on Sunday January 24, 2021 @04:13AM (#25890542)
For basic calculations, let me recommend bc to you: https://en.wikipedia.org/wiki/Bc_(programming_language)

This way you don't even have to type "print" ;)

Re:Pip has dropped support for Python 2 by krzyk on Sunday January 24, 2021 @09:24AM (#25892231)
I don't need to type it in python also, unless I do some loops or functions.

I tried bc once and it was too big learning curve for just simple calc that indo in python.

Re:Pip has dropped support for Python 2 by Too on Monday January 25, 2021 @12:36AM (#25899677)
If you use the REPL as a calculator you don't even need print at all! The terminal will automatically print the result of your last statement!

    >>> 5+5
    10
Re:Pip has dropped support for Python 2 by krzyk on Tuesday January 26, 2021 @05:29AM (#25914281)
Yes I know that.

But look at my comment above, I use also for loops and functions.