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
fc3436be
Kaydet (Commit)
fc3436be
authored
May 24, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add an encoding property to TextIOBase instances.
Add sys.__std{in,out,err}__. Make test_sys pass.
üst
75d6f1a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
io.py
Lib/io.py
+9
-0
site.py
Lib/site.py
+3
-3
No files found.
Lib/io.py
Dosyayı görüntüle @
fc3436be
...
@@ -925,6 +925,11 @@ class TextIOBase(IOBase):
...
@@ -925,6 +925,11 @@ class TextIOBase(IOBase):
raise
StopIteration
raise
StopIteration
return
line
return
line
@property
def
encoding
(
self
):
"""Subclasses should override."""
return
None
# The following are provided for backwards compatibility
# The following are provided for backwards compatibility
def
readlines
(
self
,
hint
=
None
):
def
readlines
(
self
,
hint
=
None
):
...
@@ -970,6 +975,10 @@ class TextIOWrapper(TextIOBase):
...
@@ -970,6 +975,10 @@ class TextIOWrapper(TextIOBase):
self
.
_snapshot
=
None
self
.
_snapshot
=
None
self
.
_seekable
=
self
.
_telling
=
self
.
buffer
.
seekable
()
self
.
_seekable
=
self
.
_telling
=
self
.
buffer
.
seekable
()
@property
def
encoding
(
self
):
return
self
.
_encoding
# A word about _snapshot. This attribute is either None, or a
# A word about _snapshot. This attribute is either None, or a
# tuple (decoder_state, readahead, pending) where decoder_state is
# tuple (decoder_state, readahead, pending) where decoder_state is
# the second (integer) item of the decoder state, readahead is the
# the second (integer) item of the decoder state, readahead is the
...
...
Lib/site.py
Dosyayı görüntüle @
fc3436be
...
@@ -411,9 +411,9 @@ def installnewio():
...
@@ -411,9 +411,9 @@ def installnewio():
def
__new__
(
cls
,
*
args
,
**
kwds
):
def
__new__
(
cls
,
*
args
,
**
kwds
):
return
io
.
open
(
*
args
,
**
kwds
)
return
io
.
open
(
*
args
,
**
kwds
)
__builtin__
.
open
=
open
__builtin__
.
open
=
open
sys
.
stdin
=
io
.
open
(
0
,
"r"
)
sys
.
__stdin__
=
sys
.
stdin
=
io
.
open
(
0
,
"r"
)
sys
.
stdout
=
io
.
open
(
1
,
"w"
)
sys
.
__stdout__
=
sys
.
stdout
=
io
.
open
(
1
,
"w"
)
sys
.
stderr
=
io
.
open
(
2
,
"w"
)
sys
.
__stderr__
=
sys
.
stderr
=
io
.
open
(
2
,
"w"
)
def
main
():
def
main
():
...
...
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