what does := means simply?

bartc bc at freeuk.com
Fri May 18 21:02:07 EDT 2018


On 19/05/2018 01:42, Dennis Lee Bieber wrote:
> On Fri, 18 May 2018 22:53:06 +0100, bartc <bc at freeuk.com> declaimed the
> following:
> 
> 
>> I've worked with text files for 40 years. Now Python is telling me I've
>> been doing it wrong all that time!
>>
>> Look at the original code I posted from which this Python was based.
>> That creates a file - just a file - without worrying about whether it's
>> text or binary. Files are just collections of bytes, as far as the OS is
>> concerned.
> 
> 	And on Windows, there is a difference.
> 
> 	On Windows, sending a <lf> byte to a TEXT file will result in writing
> <cr><lf>. On Windows a new-line is indicated by that combination: <cr><lf>.

Are you sure that's Windows itself, and not just the C library? (Which 
was presumably trying to be helpful by making programs work on Unix and 
Windows without changes, but is actually a nuisance.)

Some Windows programs may need cr,lf, but I doubt they well convert 
between lf and cr,lf unless they use C file functions.

-- 
bartc



More information about the Python-list mailing list