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
74c8e55f
Kaydet (Commit)
74c8e55f
authored
Eyl 12, 2003
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF bug #804280: fromkeys is not listed in index
üst
614438ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
libstdtypes.tex
Doc/lib/libstdtypes.tex
+5
-4
No files found.
Doc/lib/libstdtypes.tex
Dosyayı görüntüle @
74c8e55f
...
@@ -1082,7 +1082,7 @@ almost arbitrary values. Only values containing lists, dictionaries
...
@@ -1082,7 +1082,7 @@ almost arbitrary values. Only values containing lists, dictionaries
or other mutable types (that are compared by value rather than by
or other mutable types (that are compared by value rather than by
object identity) may not be used as keys.
object identity) may not be used as keys.
Numeric types used for keys obey the normal rules for numeric
Numeric types used for keys obey the normal rules for numeric
comparison: if two numbers compare equal (
e.g.
\code
{
1
}
and
comparison: if two numbers compare equal (
such as
\code
{
1
}
and
\code
{
1.0
}
) then they can be used interchangeably to index the same
\code
{
1.0
}
) then they can be used interchangeably to index the same
dictionary entry.
dictionary entry.
...
@@ -1102,6 +1102,7 @@ arbitrary objects):
...
@@ -1102,6 +1102,7 @@ arbitrary objects):
\ttindex
{
clear()
}
\ttindex
{
clear()
}
\ttindex
{
copy()
}
\ttindex
{
copy()
}
\ttindex
{
has
_
key()
}
\ttindex
{
has
_
key()
}
\ttindex
{
fromkeys()
}
\ttindex
{
items()
}
\ttindex
{
items()
}
\ttindex
{
keys()
}
\ttindex
{
keys()
}
\ttindex
{
update()
}
\ttindex
{
update()
}
...
@@ -1268,7 +1269,7 @@ Files have the following methods:
...
@@ -1268,7 +1269,7 @@ Files have the following methods:
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
[file]
{
next
}{}
\begin{methoddesc}
[file]
{
next
}{}
A file object is its own iterator,
i.e.
\code
{
iter(
\var
{
f
}
)
}
returns
A file object is its own iterator,
for example
\code
{
iter(
\var
{
f
}
)
}
returns
\var
{
f
}
(unless
\var
{
f
}
is closed). When a file is used as an
\var
{
f
}
(unless
\var
{
f
}
is closed). When a file is used as an
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
...
@@ -1506,8 +1507,8 @@ same as \code{\var{m}.__dict__} where \var{m} is the module in which
...
@@ -1506,8 +1507,8 @@ same as \code{\var{m}.__dict__} where \var{m} is the module in which
the function
\var
{
f
}
was defined).
the function
\var
{
f
}
was defined).
Function objects also support getting and setting arbitrary
Function objects also support getting and setting arbitrary
attributes, which can be used
to, e.g. attach metadata to functions.
attributes, which can be used
, for example, to attach metadata to
Regular attribute dot-notation is used to get and set such
functions.
Regular attribute dot-notation is used to get and set such
attributes.
\emph
{
Note that the current implementation only supports
attributes.
\emph
{
Note that the current implementation only supports
function attributes on user-defined functions. Function attributes on
function attributes on user-defined functions. Function attributes on
built-in functions may be supported in the future.
}
built-in functions may be supported in the future.
}
...
...
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