Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
88ed8f2c
Kaydet (Commit)
88ed8f2c
authored
Nis 01, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#4572: add SEEK_* values as constants in io.py.
üst
fff2f4bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
io.rst
Doc/library/io.rst
+9
-3
io.py
Lib/io.py
+5
-0
No files found.
Doc/library/io.rst
Dosyayı görüntüle @
88ed8f2c
...
@@ -265,12 +265,18 @@ I/O Base Classes
...
@@ -265,12 +265,18 @@ I/O Base Classes
interpreted relative to the position indicated by *whence*. Values for
interpreted relative to the position indicated by *whence*. Values for
*whence* are:
*whence* are:
* ``0`` -- start of the stream (the default); *offset* should be zero or positive
* :data:`SEEK_SET` or ``0`` -- start of the stream (the default);
* ``1`` -- current stream position; *offset* may be negative
*offset* should be zero or positive
* ``2`` -- end of the stream; *offset* is usually negative
* :data:`SEEK_CUR` or ``1`` -- current stream position; *offset* may
be negative
* :data:`SEEK_END` or ``2`` -- end of the stream; *offset* is usually
negative
Return the new absolute position.
Return the new absolute position.
.. versionadded:: 2.7
The ``SEEK_*`` constants
.. method:: seekable()
.. method:: seekable()
Return ``True`` if the stream supports random access. If ``False``,
Return ``True`` if the stream supports random access. If ``False``,
...
...
Lib/io.py
Dosyayı görüntüle @
88ed8f2c
...
@@ -66,6 +66,11 @@ import threading
...
@@ -66,6 +66,11 @@ import threading
# open() uses st_blksize whenever we can
# open() uses st_blksize whenever we can
DEFAULT_BUFFER_SIZE
=
8
*
1024
# bytes
DEFAULT_BUFFER_SIZE
=
8
*
1024
# bytes
# for seek()
SEEK_SET
=
0
SEEK_CUR
=
1
SEEK_END
=
2
# py3k has only new style classes
# py3k has only new style classes
__metaclass__
=
type
__metaclass__
=
type
...
...
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