summaryrefslogtreecommitdiffstats
path: root/Lib/io.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-04-06 18:11:47 (GMT)
committerGuido van Rossum <guido@python.org>2007-04-06 18:11:47 (GMT)
commit186685905ca5863e19d1efdc3b9ad5a992660d49 (patch)
tree8ac9823e4403f1284d63edb6bffc02cf2236aadd /Lib/io.py
parent78892e46131d01c6f6e6dd7276143e50ffac442d (diff)
downloadcpython-186685905ca5863e19d1efdc3b9ad5a992660d49.zip
cpython-186685905ca5863e19d1efdc3b9ad5a992660d49.tar.gz
cpython-186685905ca5863e19d1efdc3b9ad5a992660d49.tar.bz2
Get rid of duplicate definition of BufferedIOBase.
Diffstat (limited to 'Lib/io.py')
-rw-r--r--Lib/io.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/Lib/io.py b/Lib/io.py
index 23e29ba..78877f0 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -331,12 +331,7 @@ class SocketIO(RawIOBase):
return self._sock.fileno()
-class BufferedIOBase(RawIOBase):
-
- """XXX Docstring."""
-
-
-class _MemoryBufferMixin:
+class _MemoryIOBase(RawIOBase):
# XXX docstring
@@ -399,7 +394,7 @@ class _MemoryBufferMixin:
return True
-class BytesIO(_MemoryBufferMixin, BufferedIOBase):
+class BytesIO(_MemoryIOBase):
"""Buffered I/O implementation using a bytes buffer, like StringIO."""
@@ -409,10 +404,10 @@ class BytesIO(_MemoryBufferMixin, BufferedIOBase):
buffer = b""
if inital_bytes is not None:
buffer += inital_bytes
- _MemoryBufferMixin.__init__(self, buffer)
+ _MemoryIOBase.__init__(self, buffer)
-class StringIO(_MemoryBufferMixin, BufferedIOBase):
+class StringIO(_MemoryIOBase):
"""Buffered I/O implementation using a string buffer, like StringIO."""
@@ -425,7 +420,7 @@ class StringIO(_MemoryBufferMixin, BufferedIOBase):
buffer = ""
if inital_string is not None:
buffer += inital_string
- _MemoryBufferMixin.__init__(self, buffer)
+ _MemoryIOBase.__init__(self, buffer)
class BufferedIOBase(RawIOBase):
@@ -441,8 +436,7 @@ class BufferedReader(BufferedIOBase):
"""Buffer for a readable sequential RawIO object.
- Does not allow random access (seek, tell). (Use BufferedRandom
- for that.)
+ Does not allow random access (seek, tell).
"""
def __init__(self, raw, buffer_size=DEFAULT_BUFFER_SIZE):