[Patches] [ python-Patches-449085 ] Exception iterators

noreply@sourceforge.net noreply@sourceforge.net
Wed, 08 Aug 2001 07:32:07 -0700


Patches item #449085, was opened at 2001-08-08 05:00
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=449085&group_id=5470

Category: core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Exception iterators

Initial Comment:
This patch adds an __iter__ to exceptions.

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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-08 07:32

Message:
Logged In: YES 
user_id=6380

Hm, is this really necessary? You can iterate over an
exception already using the __getitem__ method. I don't see
why adding the __iter__ method makes a difference. This is
only used occasionally anyway (treating an exception object
as a sequence is a backwards compatibility thing dating back
to the time of string exceptions).

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=449085&group_id=5470