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
a801b6a1
Kaydet (Commit)
a801b6a1
authored
Nis 27, 2007
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Backport r54712: document that calling file.next() on a file open for writing
leads to undefined behaviour.
üst
c22aee03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
libstdtypes.tex
Doc/lib/libstdtypes.tex
+9
-8
NEWS
Misc/NEWS
+7
-0
No files found.
Doc/lib/libstdtypes.tex
Dosyayı görüntüle @
a801b6a1
...
@@ -1615,14 +1615,15 @@ A file object is its own iterator, for example \code{iter(\var{f})} returns
...
@@ -1615,14 +1615,15 @@ A file object is its own iterator, for example \code{iter(\var{f})} returns
iterator, typically in a
\keyword
{
for
}
loop (for example,
iterator, typically in a
\keyword
{
for
}
loop (for example,
\code
{
for line in f: print line
}
), the
\method
{
next()
}
method is
\code
{
for line in f: print line
}
), the
\method
{
next()
}
method is
called repeatedly. This method returns the next input line, or raises
called repeatedly. This method returns the next input line, or raises
\exception
{
StopIteration
}
when
\EOF
{}
is hit. In order to make a
\exception
{
StopIteration
}
when
\EOF
{}
is hit when the file is open for
\keyword
{
for
}
loop the most efficient way of looping over the lines of
reading (behavior is undefined when the file is open for writing). In
a file (a very common operation), the
\method
{
next()
}
method uses a
order to make a
\keyword
{
for
}
loop the most efficient way of looping
hidden read-ahead buffer. As a consequence of using a read-ahead
over the lines of a file (a very common operation), the
buffer, combining
\method
{
next()
}
with other file methods (like
\method
{
next()
}
method uses a hidden read-ahead buffer. As a
\method
{
readline()
}
) does not work right. However, using
consequence of using a read-ahead buffer, combining
\method
{
next()
}
\method
{
seek()
}
to reposition the file to an absolute position will
with other file methods (like
\method
{
readline()
}
) does not work
flush the read-ahead buffer.
right. However, using
\method
{
seek()
}
to reposition the file to an
absolute position will flush the read-ahead buffer.
\versionadded
{
2.3
}
\versionadded
{
2.3
}
\end{methoddesc}
\end{methoddesc}
...
...
Misc/NEWS
Dosyayı görüntüle @
a801b6a1
...
@@ -25,6 +25,13 @@ Library
...
@@ -25,6 +25,13 @@ Library
run in verbose mode.
run in verbose mode.
Documentation
-------------
- Bug #1569057: Document that calling file.next() on a file open for writing
has undefined behaviour. Backport of r54712.
What'
s
New
in
Python
2.5.1
?
What'
s
New
in
Python
2.5.1
?
=============================
=============================
...
...
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