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
45c85d15
Kaydet (Commit)
45c85d15
authored
Tem 27, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix the docstrings for keys(), items(), values() (especially the latter).
Get rid of some #ifdef'ed-out code.
üst
ea834479
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
61 deletions
+6
-61
dictobject.c
Objects/dictobject.c
+6
-61
No files found.
Objects/dictobject.c
Dosyayı görüntüle @
45c85d15
...
@@ -1806,26 +1806,6 @@ extern PyTypeObject PyDictIterValue_Type; /* Forward */
...
@@ -1806,26 +1806,6 @@ extern PyTypeObject PyDictIterValue_Type; /* Forward */
extern
PyTypeObject
PyDictIterItem_Type
;
/* Forward */
extern
PyTypeObject
PyDictIterItem_Type
;
/* Forward */
static
PyObject
*
dictiter_new
(
dictobject
*
,
PyTypeObject
*
);
static
PyObject
*
dictiter_new
(
dictobject
*
,
PyTypeObject
*
);
#if 0
static PyObject *
dict_iterkeys(dictobject *dict)
{
return dictiter_new(dict, &PyDictIterKey_Type);
}
static PyObject *
dict_itervalues(dictobject *dict)
{
return dictiter_new(dict, &PyDictIterValue_Type);
}
static PyObject *
dict_iteritems(dictobject *dict)
{
return dictiter_new(dict, &PyDictIterItem_Type);
}
#endif
PyDoc_STRVAR
(
contains__doc__
,
PyDoc_STRVAR
(
contains__doc__
,
"D.__contains__(k) -> True if D has a key k, else False"
);
"D.__contains__(k) -> True if D has a key k, else False"
);
...
@@ -1846,17 +1826,6 @@ PyDoc_STRVAR(popitem__doc__,
...
@@ -1846,17 +1826,6 @@ PyDoc_STRVAR(popitem__doc__,
"D.popitem() -> (k, v), remove and return some (key, value) pair as a
\n
\
"D.popitem() -> (k, v), remove and return some (key, value) pair as a
\n
\
2-tuple; but raise KeyError if D is empty"
);
2-tuple; but raise KeyError if D is empty"
);
#if 0
PyDoc_STRVAR(keys__doc__,
"D.keys() -> list of D's keys");
PyDoc_STRVAR(items__doc__,
"D.items() -> list of D's (key, value) pairs, as 2-tuples");
PyDoc_STRVAR(values__doc__,
"D.values() -> list of D's values");
#endif
PyDoc_STRVAR
(
update__doc__
,
PyDoc_STRVAR
(
update__doc__
,
"D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]\
"D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]\
\n
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]"
);
\n
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]"
);
...
@@ -1871,25 +1840,17 @@ PyDoc_STRVAR(clear__doc__,
...
@@ -1871,25 +1840,17 @@ PyDoc_STRVAR(clear__doc__,
PyDoc_STRVAR
(
copy__doc__
,
PyDoc_STRVAR
(
copy__doc__
,
"D.copy() -> a shallow copy of D"
);
"D.copy() -> a shallow copy of D"
);
#if 0
PyDoc_STRVAR(iterkeys__doc__,
"D.iterkeys() -> an iterator over the keys of D");
PyDoc_STRVAR(itervalues__doc__,
"D.itervalues() -> an iterator over the values of D");
PyDoc_STRVAR(iteritems__doc__,
"D.iteritems() -> an iterator over the (key, value) items of D");
#endif
/* Forward */
/* Forward */
static
PyObject
*
dictkeys_new
(
PyObject
*
);
static
PyObject
*
dictkeys_new
(
PyObject
*
);
static
PyObject
*
dictitems_new
(
PyObject
*
);
static
PyObject
*
dictitems_new
(
PyObject
*
);
static
PyObject
*
dictvalues_new
(
PyObject
*
);
static
PyObject
*
dictvalues_new
(
PyObject
*
);
PyDoc_STRVAR
(
keys__doc__
,
"D.keys() -> a set-like object for D's keys"
);
PyDoc_STRVAR
(
keys__doc__
,
PyDoc_STRVAR
(
items__doc__
,
"D.items() -> a set-like object for D's items"
);
"D.keys() -> a set-like object providing a view on D's keys"
);
PyDoc_STRVAR
(
values__doc__
,
"D.values() -> a set-like object for D's values"
);
PyDoc_STRVAR
(
items__doc__
,
"D.items() -> a set-like object providing a view on D's items"
);
PyDoc_STRVAR
(
values__doc__
,
"D.values() -> an object providing a view on D's values"
);
static
PyMethodDef
mapp_methods
[]
=
{
static
PyMethodDef
mapp_methods
[]
=
{
{
"__contains__"
,(
PyCFunction
)
dict_contains
,
METH_O
|
METH_COEXIST
,
{
"__contains__"
,(
PyCFunction
)
dict_contains
,
METH_O
|
METH_COEXIST
,
...
@@ -1904,14 +1865,6 @@ static PyMethodDef mapp_methods[] = {
...
@@ -1904,14 +1865,6 @@ static PyMethodDef mapp_methods[] = {
pop__doc__
},
pop__doc__
},
{
"popitem"
,
(
PyCFunction
)
dict_popitem
,
METH_NOARGS
,
{
"popitem"
,
(
PyCFunction
)
dict_popitem
,
METH_NOARGS
,
popitem__doc__
},
popitem__doc__
},
#if 0
{"keys", (PyCFunction)dict_keys, METH_NOARGS,
keys__doc__},
{"items", (PyCFunction)dict_items, METH_NOARGS,
items__doc__},
{"values", (PyCFunction)dict_values, METH_NOARGS,
values__doc__},
#endif
{
"keys"
,
(
PyCFunction
)
dictkeys_new
,
METH_NOARGS
,
{
"keys"
,
(
PyCFunction
)
dictkeys_new
,
METH_NOARGS
,
keys__doc__
},
keys__doc__
},
{
"items"
,
(
PyCFunction
)
dictitems_new
,
METH_NOARGS
,
{
"items"
,
(
PyCFunction
)
dictitems_new
,
METH_NOARGS
,
...
@@ -1926,14 +1879,6 @@ static PyMethodDef mapp_methods[] = {
...
@@ -1926,14 +1879,6 @@ static PyMethodDef mapp_methods[] = {
clear__doc__
},
clear__doc__
},
{
"copy"
,
(
PyCFunction
)
dict_copy
,
METH_NOARGS
,
{
"copy"
,
(
PyCFunction
)
dict_copy
,
METH_NOARGS
,
copy__doc__
},
copy__doc__
},
#if 0
{"iterkeys", (PyCFunction)dict_iterkeys, METH_NOARGS,
iterkeys__doc__},
{"itervalues", (PyCFunction)dict_itervalues, METH_NOARGS,
itervalues__doc__},
{"iteritems", (PyCFunction)dict_iteritems, METH_NOARGS,
iteritems__doc__},
#endif
{
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