]> granicus.if.org Git - python/commitdiff
document BufferedIOBase.raw and TextIOBase.buffer
authorBenjamin Peterson <benjamin@python.org>
Sun, 28 Jun 2009 17:32:20 +0000 (17:32 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 28 Jun 2009 17:32:20 +0000 (17:32 +0000)
Doc/library/io.rst

index 58661133aa6c5e1f515f39b622435c6337f55096..71d3f674033f6c2394b39765496c878d2ba65ab6 100644 (file)
@@ -359,9 +359,15 @@ I/O Base Classes
    implementation, but wrap one like :class:`BufferedWriter` and
    :class:`BufferedReader`.
 
-   :class:`BufferedIOBase` provides or overrides these methods in addition to
+   :class:`BufferedIOBase` provides or overrides these members in addition to
    those from :class:`IOBase`:
 
+   .. attribute:: raw
+
+      The underlying raw stream (a :class:`RawIOBase` instance) that
+      :class:`BufferedIOBase` deals with.  This is not part of the
+      :class:`BufferedIOBase` API and may not exist on some implementations.
+
    .. method:: detach()
 
       Separate the underlying raw stream from the buffer and return it.
@@ -607,6 +613,12 @@ Text I/O
       A string, a tuple of strings, or ``None``, indicating the newlines
       translated so far.
 
+   .. attribute:: buffer
+
+      The underlying binary buffer (a :class:`BufferedIOBase` instance) that
+      :class:`TextIOBase` deals with.  This is not part of the
+      :class:`TextIOBase` API and may not exist on some implementations.
+
    .. method:: detach()
 
       Separate the underlying buffer from the :class:`TextIOBase` and return it.