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
3978d75c
Kaydet (Commit)
3978d75c
authored
Mar 03, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added intern()
üst
38e2ec4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
libfuncs.tex
Doc/lib/libfuncs.tex
+13
-0
libfuncs.tex
Doc/libfuncs.tex
+13
-0
No files found.
Doc/lib/libfuncs.tex
Dosyayı görüntüle @
3978d75c
...
@@ -212,6 +212,19 @@ module from which it is called).
...
@@ -212,6 +212,19 @@ module from which it is called).
the backslash convention.
the backslash convention.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
intern
}{
string
}
Enter
\var
{
string
}
in the table of ``interned'' strings and return
the interned string -- which is
\var
{
string
}
itself or a copy.
Interning strings is useful to gain a little performance on
dictionary lookup -- if the keys in a dictionary are interned, and
the lookup key is interned, the key comparisons (after hashing) can
be done by a pointer compare instead of a string compare. Normally,
the names used in Python programs are automatically interned, and
the dictionaries used to hold module, class or instance attributes
have interned keys. Interned strings are immortal (i.e. never get
garbage collected).
\end{funcdesc}
\begin{funcdesc}
{
int
}{
x
}
\begin{funcdesc}
{
int
}{
x
}
Convert a number to a plain integer. The argument may be a plain or
Convert a number to a plain integer. The argument may be a plain or
long integer or a floating point number. Conversion of floating
long integer or a floating point number. Conversion of floating
...
...
Doc/libfuncs.tex
Dosyayı görüntüle @
3978d75c
...
@@ -212,6 +212,19 @@ module from which it is called).
...
@@ -212,6 +212,19 @@ module from which it is called).
the backslash convention.
the backslash convention.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
intern
}{
string
}
Enter
\var
{
string
}
in the table of ``interned'' strings and return
the interned string -- which is
\var
{
string
}
itself or a copy.
Interning strings is useful to gain a little performance on
dictionary lookup -- if the keys in a dictionary are interned, and
the lookup key is interned, the key comparisons (after hashing) can
be done by a pointer compare instead of a string compare. Normally,
the names used in Python programs are automatically interned, and
the dictionaries used to hold module, class or instance attributes
have interned keys. Interned strings are immortal (i.e. never get
garbage collected).
\end{funcdesc}
\begin{funcdesc}
{
int
}{
x
}
\begin{funcdesc}
{
int
}{
x
}
Convert a number to a plain integer. The argument may be a plain or
Convert a number to a plain integer. The argument may be a plain or
long integer or a floating point number. Conversion of floating
long integer or a floating point number. Conversion of floating
...
...
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