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
c7485064
Commit
c7485064
authored
Apr 01, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5636: fix next -> __next__ in csv reader docs.
parent
9ae3640b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
Doc/library/csv.rst
Doc/library/csv.rst
+3
-6
Lib/test/test_xmlrpc.py
Lib/test/test_xmlrpc.py
+5
-1
Lib/xmlrpc/server.py
Lib/xmlrpc/server.py
+1
-1
No files found.
Doc/library/csv.rst
View file @
c7485064
...
...
@@ -351,14 +351,13 @@ Reader Objects
Reader objects (:class:`DictReader` instances and objects returned by the
:func:`reader` function) have the following public methods:
.. method:: csvreader.next()
.. method:: csvreader.__next__()
Return the next row of the reader's iterable object as a list, parsed according
to the current dialect.
to the current dialect.
Usually you should call this as ``next(reader)``.
Reader objects have the following public attributes:
Reader objects have the following public attributes:
.. attribute:: csvreader.dialect
...
...
@@ -371,10 +370,8 @@ Reader objects have the following public attributes:
number of records returned, as records can span multiple lines.
DictReader objects have the following public attribute:
.. attribute:: csvreader.fieldnames
If not passed as a parameter when creating the object, this attribute is
...
...
Lib/test/test_xmlrpc.py
View file @
c7485064
...
...
@@ -598,7 +598,11 @@ class CGIHandlerTestCase(unittest.TestCase):
sys
.
stdin
=
open
(
"xmldata.txt"
,
"r"
)
sys
.
stdout
=
open
(
support
.
TESTFN
,
"w"
)
self
.
cgi
.
handle_request
()
os
.
environ
[
'CONTENT_LENGTH'
]
=
str
(
len
(
data
))
try
:
self
.
cgi
.
handle_request
()
finally
:
del
os
.
environ
[
'CONTENT_LENGTH'
]
sys
.
stdin
.
close
()
sys
.
stdout
.
close
()
...
...
Lib/xmlrpc/server.py
View file @
c7485064
...
...
@@ -590,7 +590,7 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
# POST data is normally available through stdin
try
:
length
=
int
(
os
.
environ
.
get
(
'CONTENT_LENGTH'
,
None
))
except
ValueError
:
except
(
ValueError
,
TypeError
)
:
length
=
-
1
if
request_text
is
None
:
request_text
=
sys
.
stdin
.
read
(
length
)
...
...
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