Re: file.read Method Documentation (Python 2.7.10)

2023-01-12 Thread Chris Angelico
On Thu, 12 Jan 2023 at 21:25, Stephen Tucker wrote: > > Chris, > > Thanks for this clarification. > > I have not found documentation that disagrees with you. I simply observe that > the documentation that I have alluded to earlier in this chain (section 5.9 > File Objects) That's specifically t

Re: file.read Method Documentation (Python 2.7.10)

2023-01-12 Thread Stephen Tucker
Chris, Thanks for this clarification. I have not found documentation that disagrees with you. I simply observe that the documentation that I have alluded to earlier in this chain (section 5.9 File Objects) could have been made clearer by the addition of a note along the lines that the behaviour o

Re: file.read Method Documentation (Python 2.7.10)

2023-01-11 Thread Roel Schroeven
Chris Angelico schreef op 11/01/2023 om 18:36: On Thu, 12 Jan 2023 at 04:31, Stephen Tucker wrote: > 1. Create BOM.txt > 2. Input three bytes at once from BOM.txt and print them > 3. Input three bytes one at a time from BOM.txt and print them All of these correctly show that a file, in binary m

Re: file.read Method Documentation (Python 2.7.10)

2023-01-11 Thread Chris Angelico
On Thu, 12 Jan 2023 at 04:31, Stephen Tucker wrote: > 1. Create BOM.txt > 2. Input three bytes at once from BOM.txt and print them > 3. Input three bytes one at a time from BOM.txt and print them All of these correctly show that a file, in binary mode, reads and writes bytes. > 4. Input three by

Re: file.read Method Documentation (Python 2.7.10)

2023-01-11 Thread Stephen Tucker
Chris, Thanks for your reply. I hope the evidence below (taken from IDLE) clarifies my issue: Stephen. == 1. Create BOM.txt - >>> myfil = open ("BOM.txt", "wb") >>> myfil.write ("\xef" + "\xbb" + "\xbf") >>> myfil.close() 2. Input three bytes at once from

Re: file.read Method Documentation (Python 2.7.10)

2023-01-11 Thread Chris Angelico
On Wed, 11 Jan 2023 at 21:31, Stephen Tucker wrote: > > Chris - > > In the Python 2.7.10 documentation, I am referring to section 5. Built-in > Types, subsection 5.9 File Objects. > > In that subsection, I have the following paragraph: > > file.read([size]) > > Read at most size bytes from the fi

Re: file.read Method Documentation (Python 2.7.10)

2023-01-11 Thread Stephen Tucker
Chris - In the Python 2.7.10 documentation, I am referring to section 5. Built-in Types, subsection 5.9 File Objects. In that subsection, I have the following paragraph: file.read([*size*]) Read at most *size* bytes from the file (less if the read hits EOF before obtaining *size* bytes). If the

Re: file.read Method Documentation (Python 2.7.10)

2023-01-09 Thread Chris Angelico
On Tue, 10 Jan 2023 at 01:36, Stephen Tucker wrote: > > Dear Python-list, > > Yes, I know that Python 2.x is no longer supported. > > I have found that the documentation for this method is misleading when the > file being read is UTF-8-encoded: > >Instead of reading *size* bytes, the method re

Re: file.read Method Documentation (Python 2.7.10)

2023-01-09 Thread Barry Scott
On 09/01/2023 14:34, Stephen Tucker wrote: Dear Python-list, Yes, I know that Python 2.x is no longer supported. I have found that the documentation for this method is misleading when the file being read is UTF-8-encoded: Instead of reading *size* bytes, the method reads *size *UTF-8 byt

file.read Method Documentation (Python 2.7.10)

2023-01-09 Thread Stephen Tucker
Dear Python-list, Yes, I know that Python 2.x is no longer supported. I have found that the documentation for this method is misleading when the file being read is UTF-8-encoded: Instead of reading *size* bytes, the method reads *size *UTF-8 byte *sequences*. Has this error been corrected in