summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-02-09 06:15:29 (GMT)
committerLarry Hastings <larry@hastings.org>2014-02-09 06:15:29 (GMT)
commit2623c8c23cead505a78ec416072223552e94727e (patch)
tree9ac129d693fd98eb33d548bc836d89e006bbb937 /Objects/dictobject.c
parent09f08fe2483aaefba367c6b0b4654c3490a32c42 (diff)
downloadcpython-2623c8c23cead505a78ec416072223552e94727e.zip
cpython-2623c8c23cead505a78ec416072223552e94727e.tar.gz
cpython-2623c8c23cead505a78ec416072223552e94727e.tar.bz2
Issue #20530: Argument Clinic's signature format has been revised again.
The new syntax is highly human readable while still preventing false positives. The syntax also extends Python syntax to denote "self" and positional-only parameters, allowing inspect.Signature objects to be totally accurate for all supported builtins in Python 3.4.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 2673817..1ccea6e 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1702,7 +1702,9 @@ Returns a new dict with keys from iterable and values equal to value.
[clinic start generated code]*/
PyDoc_STRVAR(dict_fromkeys__doc__,
-"sig=($type, iterable, value=None)\n"
+"fromkeys($type, iterable, value=None, /)\n"
+"--\n"
+"\n"
"Returns a new dict with keys from iterable and values equal to value.");
#define DICT_FROMKEYS_METHODDEF \
@@ -1730,7 +1732,7 @@ exit:
static PyObject *
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value)
-/*[clinic end generated code: output=aff6e583703dbeba input=b85a667f9bf4669d]*/
+/*[clinic end generated code: output=55f8dc0ffa87406f input=b85a667f9bf4669d]*/
{
PyObject *it; /* iter(seq) */
PyObject *key;
@@ -2209,7 +2211,9 @@ True if D has a key k, else False.
[clinic start generated code]*/
PyDoc_STRVAR(dict___contains____doc__,
-"sig=($self, key)\n"
+"__contains__($self, key, /)\n"
+"--\n"
+"\n"
"True if D has a key k, else False.");
#define DICT___CONTAINS___METHODDEF \
@@ -2217,7 +2221,7 @@ PyDoc_STRVAR(dict___contains____doc__,
static PyObject *
dict___contains__(PyDictObject *self, PyObject *key)
-/*[clinic end generated code: output=c654684a6d880281 input=b852b2a19b51ab24]*/
+/*[clinic end generated code: output=3cf3f8aaf2cc5cc3 input=b852b2a19b51ab24]*/
{
register PyDictObject *mp = self;
Py_hash_t hash;