Message280726
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. |
|
Date |
User |
Action |
Args |
2016-11-14 01:45:52 | martin.panter | set | recipients:
+ martin.panter, akuchling, terry.reedy, ncoghlan, pitrou, pakal, docs@python, berker.peksag, jstasiak |
2016-11-14 01:45:51 | martin.panter | set | messageid: <1479087951.93.0.504746021883.issue8840@psf.upfronthosting.co.za> |
2016-11-14 01:45:51 | martin.panter | link | issue8840 messages |
2016-11-14 01:45:50 | martin.panter | create | |
|