[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MBF for deprecating Python2 usage



Diane Trout <diane@ghic.org> writes:

> My suggestion was "the startup banner should print what command to run
> to get Python 2."

Thanks for the suggestion. I think it's a bad idea.

> I was thinking of the case of the end-user trying to follow a Python
> tutorial. They'd still need to exit and run the python2 command if they
> wanted 2.

That's not the issue.

The issue is: Invoking ‘python’ today gets an interpereter, Python 2,
that will work with some code and not others. It should not tomorrow
invoke an incompatible interpreter without *knowing* that the vast
majority of scripts in the wild no longer expect Python 2 to come from
that command.

That day might never come, in which case the ‘python’ command will
forever mean Python 2. That is, I'm saying, better than breaking that
command in the near or medium future.

I'm saying it's a bad idea for ‘python’ tomorrow to get an incompatible
intepreter that won't run the same Python code. That interpreter is
named ‘python3’ and should never be installed as ‘python’, because
‘python’ is a command that many scripts expect to invoke Python 2.

-- 
 \     “Reality must take precedence over public relations, for nature |
  `\       cannot be fooled.” —Richard P. Feynman, _Rogers' Commission |
_o__)                       Report into the Challenger Crash_, 1986-06 |
Ben Finney


Reply to: