[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-12 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks Dimistri for the report, Upendra for the patch, Terry for the review, and Elena for the rewrapping! I also rephrased the last sentence a bit to make it more readable. -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti resolution:

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a2692911a43 by Ezio Melotti in branch '3.5': #26001: mention in the tutorial that files in binary mode expect bytes, not str. https://hg.python.org/cpython/rev/5a2692911a43 New changeset 4b434a4770a9 by Ezio Melotti in branch 'default': #26001: mer

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-09 Thread Elena Oat
Elena Oat added the comment: Wrapped the lines to 80 chars. -- nosy: +Elena.Oat Added file: http://bugs.python.org/file41556/issue26001.diff ___ Python tracker ___ __

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Lines should be kept to about 80 chars. Both chunks needs a newline added. I think it okay to create short lines rather than re-wrapping the whole paragraph. -- nosy: +terry.reedy ___ Python tracker

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review type: -> enhancement versions: +Python 3.6 ___ Python tracker ___ ___ Python-bug

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-03 Thread Upendra Kumar
Upendra Kumar added the comment: I also think that for better clarification, binary mode and text mode should be specified clearly for both methods read() and write(). For read(), I have changed it to: ' some quantity of data and returns it as a string (in text mode) or bytes object (in bina

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-03 Thread Dimitri Papadopoulos Orfanos
New submission from Dimitri Papadopoulos Orfanos: About section "7.2.1. Methods of File Objects" of the tutorial: 1. Method read() is documented as follows: reads some quantity of data and returns it as a string or bytes object. Indeed read() returns a string in text mode and bytes in binary m