Author nobody
Date 2001-08-02.11:37:34
SpamBayes Score
Marked as misclassified
The purpose of this enhancement would be to get the 
item in a list that caused an exception when applying 
a mapped function.

For instance, suppose that I want to detect if there 
is an item in a list that is not a number. For this 
illustration I try to map float on the list and then 
catch the exception. 

   map(float, mylist)
except ValueError:
   print "The item %s in mylist is not a number." % 

The problem is that I do not know which item in the 
list caused the exception. How do I get my_item?

This information could probably be useful in a number 
of different contexts.

Thank you. 
Date User Action Args
2007-08-23 16:01:22adminlinkissue447143 messages
2007-08-23 16:01:22admincreate