mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
Fix thinko in a comment about seeking with a file object.
Reported by Francesco Trentini.
This commit is contained in:
parent
3eea25c3fa
commit
a815916472
1 changed files with 1 additions and 1 deletions
|
@ -2873,7 +2873,7 @@ using the beginning of the file as the reference point.
|
|||
\begin{verbatim}
|
||||
>>> f=open('/tmp/workfile', 'r+')
|
||||
>>> f.write('0123456789abcdef')
|
||||
>>> f.seek(5) # Go to the 5th byte in the file
|
||||
>>> f.seek(5) # Go to the 6th byte in the file
|
||||
>>> f.read(1)
|
||||
'5'
|
||||
>>> f.seek(-3, 2) # Go to the 3rd byte before the end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue