Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
18668590
Commit
18668590
authored
Apr 06, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of duplicate definition of BufferedIOBase.
parent
78892e46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
Lib/io.py
Lib/io.py
+6
-12
No files found.
Lib/io.py
View file @
18668590
...
...
@@ -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
(
_Memory
BufferMixin
,
Buffered
IOBase
):
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
_Memory
BufferMixin
.
__init__
(
self
,
buffer
)
_Memory
IOBase
.
__init__
(
self
,
buffer
)
class
StringIO
(
_Memory
BufferMixin
,
Buffered
IOBase
):
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
_Memory
BufferMixin
.
__init__
(
self
,
buffer
)
_Memory
IOBase
.
__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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment