Roundup Robot devnull@devnull added the comment:
New changeset 9201455f950b by R David Murray in branch '3.1':
#7198: really add newline='' to csv.writer docs.
http://hg.python.org/cpython/rev/9201455f950b
New changeset fa0563f3b7f7 by R David Murray in branch '3.2':
Really merge #7198
R. David Murray rdmur...@bitdance.com added the comment:
OK, now it's really done (I hope!).
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7198
___
Skip Montanaro s...@pobox.com added the comment:
John Skip, The changes that I suggested have NOT been made. Please
John re-read the doc page you pointed to. The writer paragraph does
John NOT mention that newline='' is required when writing. The writer
John examples do NOT include
Roundup Robot devnull@devnull added the comment:
New changeset 88876a264ebe by R David Murray in branch '3.1':
Markup fixes for #7198 patch.
http://hg.python.org/cpython/rev/88876a264ebe
New changeset d0d1235cb66e by R David Murray in branch '3.2':
Merge markup fixes for #7198 patch.
John Machin sjmac...@lexicon.net added the comment:
Can somebody please review my doc patch submitted 2 months ago?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7198
___
Skip Montanaro s...@pobox.com added the comment:
John John Machin sjmac...@lexicon.net added the comment:
John Can somebody please review my doc patch submitted 2 months ago?
My apologies. I have it in my sandbox, but a combination of the switch to
Mercurial and lack of round tuits has
Skip Montanaro s...@pobox.com added the comment:
Actually, I was thinking of another doc patch for the csv module.
Your changes (or something very like them) made it into the 3.2
release, as you can see here:
http://docs.python.org/py3k/library/csv.html
S
--
resolution: -
John Machin sjmac...@lexicon.net added the comment:
Skip, The changes that I suggested have NOT been made. Please re-read the doc
page you pointed to. The writer paragraph does NOT mention that newline='' is
required when writing. The writer examples do NOT include newline=''. The
examples
Roundup Robot devnull@devnull added the comment:
New changeset ab27f16f707a by R David Murray in branch 'default':
#7198: add newlines='' to csv.writer docs.
http://hg.python.org/cpython/rev/ab27f16f707a
New changeset 959f666470cc by R David Murray in branch 'default':
Merge #7198 doc fix.
R. David Murray rdmur...@bitdance.com added the comment:
Fixed now. Thanks, and sorry for the delay, and the confusion.
--
resolution: accepted - fixed
stage: needs patch - committed/rejected
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
Gah, I messed up the push. Now I have to backport the doc fix :(
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7198
___
Changes by R. David Murray rdmur...@bitdance.com:
--
assignee: skip.montanaro - r.david.murray
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7198
___
John Machin sjmac...@lexicon.net added the comment:
docpatch for 3.x csv docs:
In the csv.writer docs, insert the sentence If csvfile is a file object, it
should be opened with newline=''. immediately after the sentence csvfile can
be any object with a write() method.
In the
John Machin sjmac...@users.sourceforge.net added the comment:
Skip, I'm WRITING, not reading.. Please read the 3.1 documentation for
csv.writer. It does NOT mention newline='', and neither does the example.
Please fix.
Other problems with the examples: (1) They encourage a bad habit (open
R. David Murray rdmur...@bitdance.com added the comment:
OK, I'm reopening this as a doc issue, since currently the Python3 writer docs
do not mention newline='', and it is indeed required on Windows. John, would
you care to suggest a doc patch?
I agree with Skip that where it makes a
Skip Montanaro s...@pobox.com added the comment:
John,
The API for the open() builtin function has changed. You should open
the output file with newline= instead of using the default. Take a
look at the documentation for open() and csv.reader:
John Machin sjmac...@users.sourceforge.net added the comment:
Please re-open this. The binary/text mode problem still exists with Python 3.X
on Windows. Quite simply, there is no option available to the caller to open
the output file in binary mode, because the module is throwing str objects
Skip Montanaro s...@pobox.com added the comment:
If the documentation is not clear enough about requiring binary, it is
a doc bug.
The documentation for both csv.reader and csv.writer state (this is from the
Python 2.7 version):
If *csvfile* is a file object, it must be opened with
Éric Araujo mer...@netwok.org added the comment:
Bob, can you give us some code to reproduce the problem, in the form or a unit
test or even just a regular function? It will help confirm the bug and fix it.
--
nosy: +merwok
stage: - unit test needed
title: csv.writer - Extraneous
Bob Cannon b...@neqn.net added the comment:
Eric,
This issue was resolved for me by Skip Montanaro's response less than an
hour after I posted it. I didn't understand why a text file had to be
binary, but I no longer had a problem with extraneous. In looking back
at my message 94441, I
Éric Araujo mer...@netwok.org added the comment:
If the documentation is not clear enough about requiring binary, it is a doc
bug.
(P.S. Please strip unneeded quotes. Thanks)
--
___
Python tracker rep...@bugs.python.org
Skip Montanaro s...@pobox.com added the comment:
I got access to Python 2.6.5 on Windows and ran this simple
example:
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on
win32
Type copyright, credits or license() for more information.
22 matches
Mail list logo