[issue8840] truncate() semantics changed in 3.1.2

2020-03-05 Thread A.M. Kuchling


Change by A.M. Kuchling :


--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2018-03-06 Thread A.M. Kuchling

Change by A.M. Kuchling :


--
keywords: +patch
pull_requests: +5776

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2016-11-13 Thread Martin Panter

Martin Panter added the comment:

In general I agree with the doc strings giving the main details, and leaving 
smaller details for the reference documentation. Maybe for concrete 
implementations like BytesIO, it is not worth saying the expanded contents are 
undefined. One other way to make them shorter is to drop “as reported by 
tell()”.

diff --git a/Lib/_pyio.py b/Lib/_pyio.py
@@ -344,10 +344,12 @@
 def truncate(self, pos=None):
+"""Resize stream to at most size bytes.

Wouldn’t it be more correct to say “at most ‘pos’ bytes”?

You should avoid mentioning byte sizes for TextIOBase.truncate(); see Issue 
25849. Also applies to the StringIO subclasses.

+Position in the stream is left unchanged.  Size defaults to

I think it should be “The position in the stream . . .”, to match the other 
full sentences in these paragraphs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

The patch looks good to me, but perhaps we should make these docstrings shorter 
and refer people to the actual documentation for details? We recently did this 
in subprocess and venv modules.

--
nosy: +berker.peksag, martin.panter
stage: needs patch -> patch review
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2016-11-06 Thread A.M. Kuchling

A.M. Kuchling added the comment:

"Why, this is a simple docstring change.  How difficult can it be?", I thought.

Ah ha ha ha.

Here's a patch against the 3.5 branch. It should also apply cleanly to 3.6 or 
3.7, except for a little Argument Clinic noise. 

The patch changes 3 occurrences of the truncate() docstring in Lib/_pyio.py, 
and 1 each in Modules/_io/{bytesio.c,fileio.c,iobase.c,stringio.c}.  Whew!  Do 
we want to change all of these occurrences, or just the one specific case of 
StringIO?  It seemed to me that we want to change them all.

--
nosy: +akuchling
Added file: http://bugs.python.org/file45375/issue8840.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2016-09-12 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2016-09-12 Thread Jakub Stasiak

Changes by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2014-09-05 Thread Mark Lawrence

Mark Lawrence added the comment:

Can this be closed or what?

--
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2014-09-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The docstring is unchanged from before the behavior change and to me still has 
problems a. to d. listed in msg106698.  The manual entry seems too longs to 
just copy, but I would not know know to condense it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2014-06-07 Thread Mark Lawrence

Mark Lawrence added the comment:

Is any more work needed here as msg106725 asks about updating doc strings?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2013-01-10 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
versions: +Python 3.3, Python 3.4 -Python 2.6, Python 2.7, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee:  - d...@python
components: +Documentation
nosy: +d...@python
title: io.StringIO: truncate+print disabled in 3.1.2 - truncate() semantics 
changed in 3.1.2
versions: +Python 2.6, Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

How about reusing the documentation of legacy file objects:

“Truncate the file’s size. If the optional size argument is present, the file 
is truncated to (at most) that size. The size defaults to the current position. 
The current file position is not changed. Note that if a specified size exceeds 
the file’s current size, the result is platform-dependent: possibilities 
include that the file may remain unchanged, increase to the specified size as 
if zero-filled, or increase to the specified size with undefined new content.”

http://docs.python.org/library/stdtypes.html#file.truncate

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I've committed a doc update (a mix of the legacy truncate() doc and Pascal's 
proposal) in r81594.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Pascal Chambon

Pascal Chambon chambon.pas...@gmail.com added the comment:

Good B-)

Woudl it be necessary to update the docstrings too ?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8840
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com