Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But what's the output of

    python --version
(note not python3)


PEP 394 says that python should point to python2 for the time being.

https://www.python.org/dev/peps/pep-0394/


Yup, and it will be reviewed and likely changed at some point:

   This recommendation will be periodically reviewed over 
   the next few years, and updated when the core development
   team judges it appropriate. 
So it's likely that at some point between here and 2020, or in 2020 at worst, the recommendation will change.

IMHO Python 3 has now reached a level of maturity and backward-compatibility where it can safely take over as system python. It's now shipped by Fedora, which means the next RHEL will also ship it. Updating old scripts should mostly be a matter of grepping and shebanging from python to python2, and there is now no point in procrastinating further with this move.


Any proper Python script starts with a shebang:

    #!/usr/bin/env python3
This works on all modern Linux distributions today.


Yes, and if you write it like that, the output of `python --version` has direct consequences for the remainder of the script.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: