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
8ee52434
Kaydet (Commit)
8ee52434
authored
Agu 06, 2002
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mark xreadlines deprecated. Don't use f.xreadlines() in test_iter.py.
üst
97c5fccd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
test_iter.py
Lib/test/test_iter.py
+2
-2
test_xreadline.py
Lib/test/test_xreadline.py
+3
-0
xreadlinesmodule.c
Modules/xreadlinesmodule.c
+2
-0
No files found.
Lib/test/test_iter.py
Dosyayı görüntüle @
8ee52434
...
@@ -269,7 +269,7 @@ class TestCase(unittest.TestCase):
...
@@ -269,7 +269,7 @@ class TestCase(unittest.TestCase):
try
:
try
:
self
.
assertEqual
(
list
(
f
),
[
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
])
self
.
assertEqual
(
list
(
f
),
[
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
])
f
.
seek
(
0
,
0
)
f
.
seek
(
0
,
0
)
self
.
assertEqual
(
list
(
f
.
xreadlines
()
),
self
.
assertEqual
(
list
(
f
),
[
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
])
[
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
])
finally
:
finally
:
f
.
close
()
f
.
close
()
...
@@ -302,7 +302,7 @@ class TestCase(unittest.TestCase):
...
@@ -302,7 +302,7 @@ class TestCase(unittest.TestCase):
try
:
try
:
self
.
assertEqual
(
tuple
(
f
),
(
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
))
self
.
assertEqual
(
tuple
(
f
),
(
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
))
f
.
seek
(
0
,
0
)
f
.
seek
(
0
,
0
)
self
.
assertEqual
(
tuple
(
f
.
xreadlines
()
),
self
.
assertEqual
(
tuple
(
f
),
(
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
))
(
"0
\n
"
,
"1
\n
"
,
"2
\n
"
,
"3
\n
"
,
"4
\n
"
))
finally
:
finally
:
f
.
close
()
f
.
close
()
...
...
Lib/test/test_xreadline.py
Dosyayı görüntüle @
8ee52434
from
test.test_support
import
verbose
from
test.test_support
import
verbose
import
warnings
warnings
.
filterwarnings
(
'ignore'
,
"xreadlines"
,
DeprecationWarning
)
class
XReader
:
class
XReader
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
count
=
5
self
.
count
=
5
...
...
Modules/xreadlinesmodule.c
Dosyayı görüntüle @
8ee52434
...
@@ -173,4 +173,6 @@ initxreadlines(void)
...
@@ -173,4 +173,6 @@ initxreadlines(void)
{
{
XReadlinesObject_Type
.
ob_type
=
&
PyType_Type
;
XReadlinesObject_Type
.
ob_type
=
&
PyType_Type
;
Py_InitModule
(
"xreadlines"
,
xreadlines_functions
);
Py_InitModule
(
"xreadlines"
,
xreadlines_functions
);
PyErr_Warn
(
PyExc_DeprecationWarning
,
"xreadlines is deprecated; use 'for line in file'."
);
}
}
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