r/Python • • May 30 '19

Dear python2 user

Post image
1.9k Upvotes

275 comments sorted by

View all comments

11

u/whitechapel8733 May 30 '19

My problem with this is that lots of distros are shipping python 2 still.....

8

u/w2qw May 30 '19

Shipping or using it as the default? It makes sense that they would still ship it while it's supported.

9

u/Jump3r3 May 30 '19

Using as default, which python yields path to python 2 binary on most distros. That being said, after 1/1/20 this will slowly change for better

-4

u/Oerthling May 30 '19

which python3

1

u/SleepyHarry May 30 '19

So, you're saying that Python 3 is the default for python3, without a mention for python.

Thanks Geoff.

2

u/Oerthling May 30 '19

I think you missed the point - just like other people who downvoted my comment above.

It's a 1 character difference.

Just start your python program with python3 instead of python.

Python 2.x has been around for a long time (couple decades actually). It's difficult for any OS to switch the default for "python" to 3 instead of 2, because too many scripts, tools, etc might misinterpret that for python2 (some distros have tried for years and keep postponing for that reason).

Or you can put python3 in the shebang and let the shell call take care of it.

"python3" has been around in parallel for years and probably will be there for the foreseeable future for similar reasons. And it will always be interpreted as python 3.x.

How difficult do you think it is to write 1 more character?

0

u/Jump3r3 May 30 '19

Tbh I don't have anything against Py2 being present on my system, just rebind python to py3 and rebind existing scripts to use python2 binary