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
d594849c
Commit
d594849c
authored
Feb 26, 2004
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore sizehint argument. Fixes SF #844561.
parent
6bee23cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
Lib/codecs.py
Lib/codecs.py
+4
-10
No files found.
Lib/codecs.py
View file @
d594849c
...
...
@@ -303,14 +303,11 @@ class StreamReader(Codec):
Line breaks are implemented using the codec's decoder
method and are included in the list entries.
sizehint, if given, is
passed as size argument to the
stream's .read() method
.
sizehint, if given, is
ignored since there is no efficient
way to finding the true end-of-line
.
"""
if
sizehint
is
None
:
data
=
self
.
stream
.
read
()
else
:
data
=
self
.
stream
.
read
(
sizehint
)
data
=
self
.
stream
.
read
()
return
self
.
decode
(
data
,
self
.
errors
)[
0
].
splitlines
(
1
)
def
reset
(
self
):
...
...
@@ -488,10 +485,7 @@ class StreamRecoder:
def
readlines
(
self
,
sizehint
=
None
):
if
sizehint
is
None
:
data
=
self
.
reader
.
read
()
else
:
data
=
self
.
reader
.
read
(
sizehint
)
data
=
self
.
reader
.
read
()
data
,
bytesencoded
=
self
.
encode
(
data
,
self
.
errors
)
return
data
.
splitlines
(
1
)
...
...
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