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
f7f88b11
Kaydet (Commit)
f7f88b11
authored
Ara 13, 2000
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add long-overdue docstrings to dict methods.
üst
48971198
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
10 deletions
+52
-10
dictobject.c
Objects/dictobject.c
+52
-10
No files found.
Objects/dictobject.c
Dosyayı görüntüle @
f7f88b11
...
@@ -1230,17 +1230,59 @@ dict_tp_clear(PyObject *op)
...
@@ -1230,17 +1230,59 @@ dict_tp_clear(PyObject *op)
return
0
;
return
0
;
}
}
static
char
has_key__doc__
[]
=
"D.has_key(k) -> 1 if D has a key k, else 0"
;
static
char
get__doc__
[]
=
"D.get(k[,d]) -> D[k] if D.has_key(k), else d. d defaults to None."
;
static
char
setdefault_doc__
[]
=
"D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if not D.has_key(k)"
;
static
char
popitem__doc__
[]
=
"D.popitem() -> (k, v), remove and return some (key, value) pair as a
\n
\
2-tuple; but raise KeyError if D is empty"
;
static
char
keys__doc__
[]
=
"D.keys() -> list of D's keys"
;
static
char
items__doc__
[]
=
"D.items() -> list of D's (key, value) pairs, as 2-tuples"
;
static
char
values__doc__
[]
=
"D.values() -> list of D's values"
;
static
char
update__doc__
[]
=
"D.update(E) -> None. Update D from E: for k in E.keys(): D[k] = E[k]"
;
static
char
clear__doc__
[]
=
"D.clear() -> None. Remove all items from D."
;
static
char
copy__doc__
[]
=
"D.copy() -> a shallow copy of D"
;
static
PyMethodDef
mapp_methods
[]
=
{
static
PyMethodDef
mapp_methods
[]
=
{
{
"has_key"
,
(
PyCFunction
)
dict_has_key
,
METH_VARARGS
},
{
"has_key"
,
(
PyCFunction
)
dict_has_key
,
METH_VARARGS
,
{
"keys"
,
(
PyCFunction
)
dict_keys
},
has_key__doc__
},
{
"items"
,
(
PyCFunction
)
dict_items
},
{
"get"
,
(
PyCFunction
)
dict_get
,
METH_VARARGS
,
{
"values"
,
(
PyCFunction
)
dict_values
},
get__doc__
},
{
"update"
,
(
PyCFunction
)
dict_update
},
{
"setdefault"
,
(
PyCFunction
)
dict_setdefault
,
METH_VARARGS
,
{
"clear"
,
(
PyCFunction
)
dict_clear
},
setdefault_doc__
},
{
"copy"
,
(
PyCFunction
)
dict_copy
},
{
"popitem"
,
(
PyCFunction
)
dict_popitem
,
METH_OLDARGS
,
{
"get"
,
(
PyCFunction
)
dict_get
,
METH_VARARGS
},
popitem__doc__
},
{
"setdefault"
,
(
PyCFunction
)
dict_setdefault
,
METH_VARARGS
},
{
"keys"
,
(
PyCFunction
)
dict_keys
,
METH_OLDARGS
,
{
"popitem"
,
(
PyCFunction
)
dict_popitem
},
keys__doc__
},
{
"items"
,
(
PyCFunction
)
dict_items
,
METH_OLDARGS
,
items__doc__
},
{
"values"
,
(
PyCFunction
)
dict_values
,
METH_OLDARGS
,
values__doc__
},
{
"update"
,
(
PyCFunction
)
dict_update
,
METH_OLDARGS
,
update__doc__
},
{
"clear"
,
(
PyCFunction
)
dict_clear
,
METH_OLDARGS
,
clear__doc__
},
{
"copy"
,
(
PyCFunction
)
dict_copy
,
METH_OLDARGS
,
copy__doc__
},
{
NULL
,
NULL
}
/* sentinel */
{
NULL
,
NULL
}
/* sentinel */
};
};
...
...
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