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
97c2fa03
Kaydet (Commit)
97c2fa03
authored
Haz 17, 1999
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Small English usage nits.
üst
7487c022
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
liblinecache.tex
Doc/lib/liblinecache.tex
+13
-10
No files found.
Doc/lib/liblinecache.tex
Dosyayı görüntüle @
97c2fa03
\section
{
\module
{
linecache
}
---
Treat files like lists of
lines
}
Random access to text
lines
}
\declaremodule
{
standard
}{
linecache
}
\sectionauthor
{
Moshe Zadka
}{
mzadka@geocities.com
}
\modulesynopsis
{
This module treats files like random-access lists of lines.
}
\modulesynopsis
{
This module provides random access to individual lines
from text files.
}
The
\module
{
linecache
}
module allows one to get any line from any file,
while attempting to optimize internally, using a cache, the common case
where many lines are read from a file.
where many lines are read from a single file. This is used by the
\refmodule
{
traceback
}
module to retrieve source lines for inclusion in
the formatted traceback.
The
\module
{
linecache
}
module defines the following functions:
...
...
@@ -17,19 +20,19 @@ Get line \var{lineno} from file named \var{filename}. This function
will never throw an exception --- it will return
\code
{
''
}
on errors.
If a file named
\var
{
filename
}
is not found, the function will look
for it in the module search path.
for it in the module
\indexiii
{
module
}{
search
}{
path
}
search path,
\code
{
sys.path
}
.
\end{funcdesc}
\begin{funcdesc}
{
clearcache
}{}
Clear the cache.
You might want to use this function if you know that
you do not need to read lines from many of files you already read from
using this
module.
Clear the cache.
Use this function if you know that you do not need
to read lines from many of files you already read from using this
module.
\end{funcdesc}
\begin{funcdesc}
{
checkcache
}{}
Check the cache is still valid. You might want to use this function if
you suspect that files you read from using this module might have
changed.
Check the cache for validity. Use this function if files in the cache
may have changed on disk, and you require the updated version.
\end{funcdesc}
Example:
...
...
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