PEP0238 lament

David Boddie david at boddie.net
Sun Jul 29 17:29:39 EDT 2001


Peter Hansen <peter at engcorp.com> wrote in message news:<3B638FA8.8D24A152 at engcorp.com>...
> David Boddie wrote:
> > 
> > Guido van Rossum <guido at python.org> wrote in message news:<cpu1zy16g7.fsf at cj20424-a.reston1.va.home.com>...
> > > Suppose that python 3.x would *always* have to be invoked as
> > > "python3".  Would that still break legacy code?  This approach was
> > > used successfully by Perl.
> > 
> > That's a good compromise which will prevent a lot of breakage. As long
> > as you're happy with it, then I'm happy.
> 
> How so?  Wouldn't that just be something which forces people moving
> to Python3 to take a small explicit step, thereby allowing us 
> to say, "Of course your code broke, you changed your executable,
> what did you expect?".

It's not perfect, but it's better that the change is explicit,
wouldn't you say?

> This could be a "solution" if the change wasn't clearly 
> communicated over the next two (or whatever) years before the
> change becomes the default, but assuming the change is widely
> publicized, what real benefit does it bring to force the name 
> of the executable to be python3?

It isn't even close to being a "solution" since Python scripts are
invoked in a number of ways which don't depend on the executable to be
"python" or "python3".

It may, at least, prevent some people in the future from running
scripts which will break on a later interpreter. That may be a bad
thing, but not the worst thing that could happen.

> And would the same benefit arise by having the default name
> of the executable be "python3", but not forcing it to be so?

I would imagine that renaming your new "python3" interpreter to
"python" would wipe out any advantage that the above plan gives you.



More information about the Python-list mailing list