[Python-ideas] Migration of /usr/bin/python to python3

Andrew Barnert abarnert at yahoo.com
Thu Mar 12 11:42:51 CET 2015


On Mar 12, 2015, at 3:23 AM, Oleg Broytman <phd at phdru.name> wrote:
> 
>> On Thu, Mar 12, 2015 at 03:17:47AM -0700, Andrew Barnert <abarnert at yahoo.com> wrote:
>> On Mar 12, 2015, at 1:24 AM, Oleg Broytman <phd at phdru.name> wrote:
>>>>> On Wed, Mar 11, 2015 at 07:42:38PM -0400, random832 at fastmail.us wrote:
>>>>> On Wed, Mar 11, 2015, at 15:43, Neil Schemenauer wrote:
>>>>> Traditionally the OS only passes the first option to the
>>>>> interpreter so anything after that could be used to pass 3.x
>>>>> specific options.
>>>> 
>>>> I think some OSes pass everything after the interpreter as one long
>>>> string rather than ignoring extra arguments. Is there any standard for
>>>> this?
>>> 
>>>  There *are* standards ;-) See
>>> http://www.in-ulm.de/~mascheck/various/shebang/#splitting
>>>  and the table below.
>> 
>> A table showing that a variety of systems do things in all three of the conceivable ways is pretty much the exact opposite of a standard.
> 
>   Isn't that how all standards are implemented in real life?! ;-)

Sure, there are cases where there is a standard but nobody follows it, but that's not the case here: there is no standard to follow in the first place. The relevant standard document (POSIX 2008 or 2013, for most *nixes) explicitly says the behavior is not defined by the standard.

(And practically, that makes even more of a difference than it should, as various C libs have at times _intentionally_ done things differently when the standard leaves it open, for good and bad reasons ranging from "so people don't rely on 'it works on Linux and FreeBSD, so it must be standard and portable, so I won't look it up'" to "screw those BSD people for implying something is portable without checking with us".)

> -- 
>     Oleg Broytman            http://phdru.name/            phd at phdru.name
>           Programmers don't die, they just GOSUB without RETURN.
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/


More information about the Python-ideas mailing list