[Python-ideas] Normalized Python

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Jan 29 15:08:39 CET 2014


On 29/01/2014 09:11, anatoly techtonik wrote:
> Python is a cross-platform language, but I often find myself writing
> sections specific for Windows and for Linux and sometimes even OS
> setting specific code. In these moments I that Python is not more
> cross-platform that C, for example.
>
> What could be done?
>
>
> Normalized Python - a set of default, standard behaviors that backup
> common user expectations about cross-platform and system-independent
> behavior regardless of backward compatibility and code compatibility
> concerns.
>
>
> This is needed, for example, to collect these two features:
> 1. open files in binary mode by default
> why?
>      because "text file" is a human abstraction, for operating
>      system it is just another format of binary data, so default
>      operation is to read this data without any preprocessing
>
> 2. open text files in utf-8 encoding
> why?
>      because users can not know the encoding of operating
>      system, their programs can not choose right encoding,
>      therefore a best guess is to expect the most widely used
>      standard
>
> 3. threat stdout/stdin streams as binary
> why?
>      because you don't want you data to be corrupt when
>      you pass it in and out of Python via standard streams
>
>
> Having a separate "Normalized Python" concept is needed to set
> the context for developing and engineering ideas, instead of
> concentrating on the sad reality of backward compatibility curse.
>

I support what Chris Angelico has said on another thread, fork Python 
and if it's good enough everybody will flock to it.  This also avoids 
the problem with the CLA.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence



More information about the Python-ideas mailing list