File: /Users/paulross/dev/Python-3.6.2/Objects/clinic/dictobject.c.h

Green shading in the line number column means the source is part of the translation unit, red means it is conditionally excluded. Highlighted line numbers link to the translation unit page. Highlighted macros link to the macro page.

       1: /*[clinic input]
       2: preserve
       3: [clinic start generated code]*/
       4: 
       5: PyDoc_STRVAR(dict_fromkeys__doc__,
       6: "fromkeys($type, iterable, value=None, /)\n"
       7: "--\n"
       8: "\n"
       9: "Returns a new dict with keys from iterable and values equal to value.");
      10: 
      11: #define DICT_FROMKEYS_METHODDEF    \
      12:     {"fromkeys", (PyCFunction)dict_fromkeys, METH_VARARGS|METH_CLASS, dict_fromkeys__doc__},
      13: 
      14: static PyObject *
      15: dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
      16: 
      17: static PyObject *
      18: dict_fromkeys(PyTypeObject *type, PyObject *args)
      19: {
      20:     PyObject *return_value = NULL;
      21:     PyObject *iterable;
      22:     PyObject *value = Py_None;
      23: 
      24:     if (!PyArg_UnpackTuple(args, "fromkeys",
      25:         1, 2,
      26:         &iterable, &value)) {
      27:         goto exit;
      28:     }
      29:     return_value = dict_fromkeys_impl(type, iterable, value);
      30: 
      31: exit:
      32:     return return_value;
      33: }
      34: 
      35: PyDoc_STRVAR(dict___contains____doc__,
      36: "__contains__($self, key, /)\n"
      37: "--\n"
      38: "\n"
      39: "True if D has a key k, else False.");
      40: 
      41: #define DICT___CONTAINS___METHODDEF    \
      42:     {"__contains__", (PyCFunction)dict___contains__, METH_O|METH_COEXIST, dict___contains____doc__},
      43: /*[clinic end generated code: output=926326109e3d9839 input=a9049054013a1b77]*/
      44: