summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-06-13 20:33:02 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-06-13 20:33:02 (GMT)
commit14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f (patch)
tree7b150133cdd51df851c6bdaf261cd9ea30c149af /Objects/dictobject.c
parent654c11ee3a2c9b72c040524c9cc4f95a1858f20b (diff)
downloadcpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.zip
cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.gz
cpython-14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f.tar.bz2
Patch #568124: Add doc string macros.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 1bd2f64..d7bbef9 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1660,48 +1660,48 @@ dict_iteritems(dictobject *dict)
}
-static char has_key__doc__[] =
-"D.has_key(k) -> 1 if D has a key k, else 0";
+PyDoc_STRVAR(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.";
+PyDoc_STRVAR(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)";
+PyDoc_STRVAR(setdefault_doc__,
+"D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if not D.has_key(k)");
-static char pop__doc__[] =
-"D.pop(k) -> v, remove specified key and return the corresponding value";
+PyDoc_STRVAR(pop__doc__,
+"D.pop(k) -> v, remove specified key and return the corresponding value");
-static char popitem__doc__[] =
+PyDoc_STRVAR(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";
+2-tuple; but raise KeyError if D is empty");
-static char keys__doc__[] =
-"D.keys() -> list of D's keys";
+PyDoc_STRVAR(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";
+PyDoc_STRVAR(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";
+PyDoc_STRVAR(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]";
+PyDoc_STRVAR(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.";
+PyDoc_STRVAR(clear__doc__,
+"D.clear() -> None. Remove all items from D.");
-static char copy__doc__[] =
-"D.copy() -> a shallow copy of D";
+PyDoc_STRVAR(copy__doc__,
+"D.copy() -> a shallow copy of D");
-static char iterkeys__doc__[] =
-"D.iterkeys() -> an iterator over the keys of D";
+PyDoc_STRVAR(iterkeys__doc__,
+"D.iterkeys() -> an iterator over the keys of D");
-static char itervalues__doc__[] =
-"D.itervalues() -> an iterator over the values of D";
+PyDoc_STRVAR(itervalues__doc__,
+"D.itervalues() -> an iterator over the values of D");
-static char iteritems__doc__[] =
-"D.iteritems() -> an iterator over the (key, value) items of D";
+PyDoc_STRVAR(iteritems__doc__,
+"D.iteritems() -> an iterator over the (key, value) items of D");
static PyMethodDef mapp_methods[] = {
{"has_key", (PyCFunction)dict_has_key, METH_O,
@@ -1816,14 +1816,14 @@ dict_iter(dictobject *dict)
return dictiter_new(dict, select_key);
}
-static char dictionary_doc[] =
+PyDoc_STRVAR(dictionary_doc,
"dict() -> new empty dictionary.\n"
"dict(mapping) -> new dictionary initialized from a mapping object's\n"
" (key, value) pairs.\n"
"dict(seq) -> new dictionary initialized as if via:\n"
" d = {}\n"
" for k, v in seq:\n"
-" d[k] = v";
+" d[k] = v");
PyTypeObject PyDict_Type = {
PyObject_HEAD_INIT(&PyType_Type)