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
9fe6199b
Commit
9fe6199b
authored
May 29, 2010
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #8840: Make documentation for truncate() clearer
parent
84a8d8fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Doc/library/io.rst
Doc/library/io.rst
+6
-4
No files found.
Doc/library/io.rst
View file @
9fe6199b
...
...
@@ -320,10 +320,12 @@ I/O Base Classes
.. method:: truncate(size=None)
Truncate the file to at most *size* bytes. *size* defaults to the current
file position, as returned by :meth:`tell`. Note that the current file
position isn't changed; if you want to change it to the new end of
file, you have to :meth:`seek()` explicitly.
Resize the stream to the given *size* in bytes (or the current position
if *size* is not specified). The current stream position isn't changed.
This resizing can extend or reduce the current file size. In case of
extension, the contents of the new file area depend on the platform
(on most systems, additional bytes are zero-filled, on Windows they're
undetermined). The new file size is returned.
.. method:: writable()
...
...
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