what does := means simply?

Chris Angelico rosuav at gmail.com
Fri May 18 20:00:33 EDT 2018


On Sat, May 19, 2018 at 7:53 AM, bartc <bc at freeuk.com> wrote:
> 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.
>
> So what could be more natural than writing a byte to the end of a file?

So, you create a file without worrying about whether it's text or
binary, and you add a byte to the end of the file. That means you're
treating it as a binary file, not as a text file. Do you understand
that?

ChrisA



More information about the Python-list mailing list