This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author twobitsprite
Recipients
Date 2007-03-22.20:06:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
--- bltinmodule-orig.c  2007-03-22 16:00:21.452245559 -0400
+++ bltinmodule.c       2007-03-22 15:56:19.353115310 -0400
@@ -69,6 +69,17 @@
        return PyNumber_Absolute(v);
 }

+static PyObject *
+builtin_identity(PyObject *self, PyObject *v)
+{
+       return v;
+}
+
+PyDoc_STRVAR(identity_doc,
+"identity(x) -> x\n\
+\n\
+The identity function. Simply returns is first argument.");
+
 PyDoc_STRVAR(abs_doc,
 "abs(number) -> number\n\
 \n\
@@ -2281,6 +2292,7 @@
 #endif
        {"vars",        builtin_vars,       METH_VARARGS, vars_doc},
        {"zip",         builtin_zip,        METH_VARARGS, zip_doc},
+       {"identity",    builtin_identity,   METH_O, identity_doc},
        {NULL,          NULL},
 };

History
Date User Action Args
2007-08-23 16:12:36adminlinkissue1673203 messages
2007-08-23 16:12:36admincreate