[ python-Bugs-871704 ] Py_SequenceFast can mask errors

SourceForge.net noreply at sourceforge.net
Sun Jan 11 18:27:57 EST 2004


Bugs item #871704, was opened at 2004-01-06 09:53
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=871704&group_id=5470

Category: Python Interpreter Core
>Group: Python 2.4
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Greg Chapman (glchapman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Py_SequenceFast can mask errors

Initial Comment:
I just ran into a case where a generator passed to 
list.extend was raising the error "argument to list.extend
() must be iterable".  It turned out that code inside the 
generator was causing a TypeError.  This error was then 
caught by PySequence_Fast, which remapped it to its 
error string parameter.

Attached is a modified PySequence_Fast which should 
avoid this kind of masking.


----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-01-11 18:27

Message:
Logged In: YES 
user_id=80475

I'm accepting this for Py2.4 but doubt that it should be
backported to Py2.3.  Since only the message changes, no
ones code will live or die by this one.

Thanks for the patch.

See Objects/abstract.c 2.123.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=871704&group_id=5470



More information about the Python-bugs-list mailing list