[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you think you will ever contribute another patch (and we hope you do), and you have not yet submitted a contributor agreement, please do. http://www.python.org/psf/contrib/contrib-form/ http://www.python.org/psf/contrib/ Once processed, a * will appear

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: David, with the addition, this line class FileInput([files[, inplace[, backup[, bufsize[, mode[, openhook]]) ends at position 83 instead of 80. It should stay on one line. I could reduce that by removing blanks after ,s. Is it better to be a bit too

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread R. David Murray
R. David Murray added the comment: At 83 it is a judgement call whether to leave it long or wrap it. I wouldn't compress it. (Wrapping is done by putting a '\' at the end of the line you want to wrap, if you don't already know that). -- ___

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: Added file: http://bugs.python.org/file30727/18315-fileinput-27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18315 ___

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-27 Thread Terrel Shumway
New submission from Terrel Shumway: for line in fileinput.input(files,inplace,backup,rU): File /usr/lib/python2.7/fileinput.py, line 253, in next line = self.readline() File /usr/lib/python2.7/fileinput.py, line 346, in readline self._buffer = self._file.readlines(self._bufsize)

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-27 Thread Terrel Shumway
Terrel Shumway added the comment: http://hg.python.org/cpython/file/4dbbf322a9df/Lib/fileinput.py In the process, I added an optional bufsize argument to the input() function and the FileInput class. -- ___ Python tracker rep...@bugs.python.org

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-27 Thread R. David Murray
R. David Murray added the comment: A quick look at the VCS history indicates bufsize has been in there for a long time. The sphinx docs are wrong as well. This is correctly documented in python3, apparently as part of the conversion from [] notation to keyword notation in d143eb624cf5.

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-27 Thread Terrel Shumway
Terrel Shumway added the comment: http://hg.python.org/cpython/file/68c776ba5ea5/Lib/fileinput.py This is where the incorrect docstrings get added. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18315

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-27 Thread Terrel Shumway
Terrel Shumway added the comment: Here is a patch against the 2.7 branch. It will probably also apply to 2.6 if anyone cares. -- keywords: +patch Added file: http://bugs.python.org/file30712/fileinput-document-bufsize.patch ___ Python tracker

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-27 Thread Terrel Shumway
Terrel Shumway added the comment: Oops. I messed up, even on such a tiny fix. #:( -- Added file: http://bugs.python.org/file30713/fileinput-document-bufsize.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18315