Ok I have installed python and ended up with python2 and python3. No harm in that — in fact it’s pretty much standard. And, hassle free, thank you again.
My suggestion is for ‘brew install python3’ to offer to make /usr/local/bin/python, etc point to python3, etc., rather than the current default of python2. (And I am simplifying the version numbers here.)
I am “looking to the future” and have no personal code legacy to support. So python3 is where I want to go.
Legacy issues are handled since /usr/bin/python, etc remains unchanged — the newly installed pythons in the Cellar are not going to be seen by any pre-existing system code since these processes will not have /usr/local/bin on their $PATH, or their shebang.
Of course this isn’t for everyone, hence the suggestion for an installer choice to leave the python2 family as the default vs a change making the default python3. Depending on the user’s selection the bare symlinks can then point to the desired numbered version.
Of course careful programers should continue to use python3 in the shebang and/or have a coded version trap (esp. if their code is likely to be used ‘off site’), but, for general work the day to day convenience would be nice.
Looking around on the net for discussion of ‘solutions’ it’s mostly about defining an alias (or four), or tinkering with links. Neither is attractive to me: confusing, error-prone and ongoing maintenance issues. And I don’t want to consider putting ~/…/bin at the top of my $PATH (opens serious security vulnerabilities).
Is this installer option worth considering?
BTW if I was to replace symlinks in /usr/local/bin such as: python -> ./python3 would this mess with the brew when it came to python3 updates (or would the links just get overwritten, i.e., need maintenance)? The extra level of indirection doesn’t bother me, esp. as the links would otherwise continue to point to the updated versions as they are installed.