[Python-checkins] r61037 - python/trunk/Python/bltinmodule.c
neal.norwitz
python-checkins at python.org
Sun Feb 24 03:20:25 CET 2008
Author: neal.norwitz
Date: Sun Feb 24 03:20:25 2008
New Revision: 61037
Modified:
python/trunk/Python/bltinmodule.c
Log:
map(None, ...) is not supported in 3.0.
Modified: python/trunk/Python/bltinmodule.c
==============================================================================
--- python/trunk/Python/bltinmodule.c (original)
+++ python/trunk/Python/bltinmodule.c Sun Feb 24 03:20:25 2008
@@ -909,9 +909,15 @@
func = PyTuple_GetItem(args, 0);
n--;
- if (func == Py_None && n == 1) {
- /* map(None, S) is the same as list(S). */
- return PySequence_List(PyTuple_GetItem(args, 1));
+ if (func == Py_None) {
+ if (Py_Py3kWarningFlag &&
+ PyErr_Warn(PyExc_DeprecationWarning,
+ "map(None, ...) not supported in 3.x") < 0)
+ return NULL;
+ if (n == 1) {
+ /* map(None, S) is the same as list(S). */
+ return PySequence_List(PyTuple_GetItem(args, 1));
+ }
}
/* Get space for sequence descriptors. Must NULL out the iterator
More information about the Python-checkins
mailing list