summaryrefslogtreecommitdiff
path: root/paramiko/file.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-04-24 09:33:38 -0700
committerJeff Forcier <jeff@bitprophet.org>2014-04-24 09:33:38 -0700
commit5636381591aa26a9f31efab450b6bfdd6659cbb3 (patch)
treea81299cb4356a54653c3f71d758537c284d09232 /paramiko/file.py
parent3fce8abf68f386d18f2fad9f086e0d436af57b3a (diff)
downloadparamiko-5636381591aa26a9f31efab450b6bfdd6659cbb3.tar.gz
Reword docs/changelog re #315
Diffstat (limited to 'paramiko/file.py')
-rw-r--r--paramiko/file.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/paramiko/file.py b/paramiko/file.py
index 725ca5f6..70243e40 100644
--- a/paramiko/file.py
+++ b/paramiko/file.py
@@ -124,15 +124,14 @@ class BufferedFile (object):
file first). If the ``size`` argument is negative or omitted, read all
the remaining data in the file.
- `'b' mode flag is ignored (self.FLAG_BINARY in self._flags), because
- SSH treats all files as binary, since we have no idea what encoding
- the file is in, or even if the file is text data.
-
+ ``'b'`` mode flag is ignored (``self.FLAG_BINARY`` in ``self._flags``),
+ because SSH treats all files as binary, since we have no idea what
+ encoding the file is in, or even if the file is text data.
:param int size: maximum number of bytes to read
:return:
- data read from the file (as bytes ), or an empty string
- if EOF was encountered immediately
+ data read from the file (as bytes), or an empty string if EOF was
+ encountered immediately
"""
if self._closed:
raise IOError('File is closed')
@@ -193,10 +192,10 @@ class BufferedFile (object):
:return:
next line of the file, or an empty string if the end of the
file has been reached.
- If the file was opened in binary 'b' mode: bytes are returned
- Else: the encoding of the file is assumed to be utf-8 (default
- encoding used by paramiko.py3compat.u) and character strings
- (`str`) are returned
+
+ If the file was opened in binary (``'b'``) mode: bytes are returned
+ Else: the encoding of the file is assumed to be UTF-8 and character
+ strings (`str`) are returned
"""
# it's almost silly how complex this function is.
if self._closed: