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

Upendra Kumar report at bugs.python.org
Sun Jan 3 21:13:59 EST 2016

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 binary mode).'

For write(), I have changed it to:

' To write something other than a string (in text mode) or bytes object (in binary mode), it needs to be converted first to string or bytes object respectively. '

Please if someone could review it, as I have not submitted a patch related to docs before. And I am not sure, if I have made correct changes at right place.

keywords: +patch
nosy: +upendra-k14
Added file: http://bugs.python.org/file41486/fileiotutorial.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list