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
69c70a2f
Kaydet (Commit)
69c70a2f
authored
Mar 25, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Support 'whence' parameter to seek().
üst
55730316
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
multifile.py
Lib/multifile.py
+11
-2
No files found.
Lib/multifile.py
Dosyayı görüntüle @
69c70a2f
...
...
@@ -44,8 +44,17 @@ class MultiFile:
return
self
.
lastpos
return
self
.
fp
.
tell
()
-
self
.
start
#
def
seek
(
self
,
pos
):
if
not
0
<=
pos
<=
self
.
tell
()
or
\
def
seek
(
self
,
pos
,
whence
=
0
):
here
=
self
.
tell
()
if
whence
:
if
whence
==
1
:
pos
=
pos
+
here
elif
whence
==
2
:
if
self
.
level
>
0
:
pos
=
pos
+
self
.
lastpos
else
:
raise
Error
,
"can't use whence=2 yet"
if
not
0
<=
pos
<=
here
or
\
self
.
level
>
0
and
pos
>
self
.
lastpos
:
raise
Error
,
'bad MultiFile.seek() call'
self
.
fp
.
seek
(
pos
+
self
.
start
)
...
...
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