Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d692a71f
Commit
d692a71f
authored
Sep 07, 2009
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert r74699 since it loses useful error information
parent
23d92531
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
Python/bltinmodule.c
Python/bltinmodule.c
+13
-2
No files found.
Python/bltinmodule.c
View file @
d692a71f
...
...
@@ -968,8 +968,14 @@ builtin_map(PyObject *self, PyObject *args)
/* Get iterator. */
curseq
=
PyTuple_GetItem
(
args
,
i
+
1
);
sqp
->
it
=
PyObject_GetIter
(
curseq
);
if
(
sqp
->
it
==
NULL
)
if
(
sqp
->
it
==
NULL
)
{
static
char
errmsg
[]
=
"argument %d to map() must support iteration"
;
char
errbuf
[
sizeof
(
errmsg
)
+
25
];
PyOS_snprintf
(
errbuf
,
sizeof
(
errbuf
),
errmsg
,
i
+
2
);
PyErr_SetString
(
PyExc_TypeError
,
errbuf
);
goto
Fail_2
;
}
/* Update len. */
curlen
=
_PyObject_LengthHint
(
curseq
,
8
);
...
...
@@ -2457,8 +2463,13 @@ builtin_zip(PyObject *self, PyObject *args)
for
(
i
=
0
;
i
<
itemsize
;
++
i
)
{
PyObject
*
item
=
PyTuple_GET_ITEM
(
args
,
i
);
PyObject
*
it
=
PyObject_GetIter
(
item
);
if
(
it
==
NULL
)
if
(
it
==
NULL
)
{
if
(
PyErr_ExceptionMatches
(
PyExc_TypeError
))
PyErr_Format
(
PyExc_TypeError
,
"zip argument #%zd must support iteration"
,
i
+
1
);
goto
Fail_ret_itlist
;
}
PyTuple_SET_ITEM
(
itlist
,
i
,
it
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment