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
f91197c6
Kaydet (Commit)
f91197c6
authored
Nis 09, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More docstring fixes, and an XXX.
üst
67b8cad1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
io.py
Lib/io.py
+5
-4
No files found.
Lib/io.py
Dosyayı görüntüle @
f91197c6
...
@@ -257,9 +257,9 @@ class IOBase(metaclass=abc.ABCMeta):
...
@@ -257,9 +257,9 @@ class IOBase(metaclass=abc.ABCMeta):
return
self
.
seek
(
0
,
1
)
return
self
.
seek
(
0
,
1
)
def
truncate
(
self
,
pos
:
int
=
None
)
->
int
:
def
truncate
(
self
,
pos
:
int
=
None
)
->
int
:
"""truncate(
size: int = None) -> int. Truncate file to size
bytes.
"""truncate(
pos: int = None) -> int. Truncate file to pos
bytes.
Size
defaults to the current IO position as reported by tell().
Pos
defaults to the current IO position as reported by tell().
Returns the new size.
Returns the new size.
"""
"""
self
.
_unsupported
(
"truncate"
)
self
.
_unsupported
(
"truncate"
)
...
@@ -465,7 +465,7 @@ class RawIOBase(IOBase):
...
@@ -465,7 +465,7 @@ class RawIOBase(IOBase):
def
read
(
self
,
n
:
int
=
-
1
)
->
bytes
:
def
read
(
self
,
n
:
int
=
-
1
)
->
bytes
:
"""read(n: int) -> bytes. Read and return up to n bytes.
"""read(n: int) -> bytes. Read and return up to n bytes.
Returns an empty bytes
array
on EOF, or None if the object is
Returns an empty bytes
object
on EOF, or None if the object is
set not to block and has no data to read.
set not to block and has no data to read.
"""
"""
if
n
is
None
:
if
n
is
None
:
...
@@ -478,7 +478,7 @@ class RawIOBase(IOBase):
...
@@ -478,7 +478,7 @@ class RawIOBase(IOBase):
return
bytes
(
b
)
return
bytes
(
b
)
def
readall
(
self
):
def
readall
(
self
):
"""readall() -> bytes. Read until EOF, using multiple read() call."""
"""readall() -> bytes. Read until EOF, using multiple read() call
s
."""
res
=
bytearray
()
res
=
bytearray
()
while
True
:
while
True
:
data
=
self
.
read
(
DEFAULT_BUFFER_SIZE
)
data
=
self
.
read
(
DEFAULT_BUFFER_SIZE
)
...
@@ -521,6 +521,7 @@ class FileIO(_fileio._FileIO, RawIOBase):
...
@@ -521,6 +521,7 @@ class FileIO(_fileio._FileIO, RawIOBase):
def
name
(
self
):
def
name
(
self
):
return
self
.
_name
return
self
.
_name
# XXX(gb): _FileIO already has a mode property
@property
@property
def
mode
(
self
):
def
mode
(
self
):
return
self
.
_mode
return
self
.
_mode
...
...
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