Faqts : Business : Programming : Shopping For You : Python : Language and Syntax : Classes

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 4 people (75%) answered Yes
Recently 2 of 3 people (67%) answered Yes

Entry

if i create a class that has __getitem__, how do i tell the calling for loop there are no more items to loop over

Jul 12th, 2001 15:04
Mark Paschal, dave meltzer, Kelly Walker


Raise an IndexError:

raise IndexError, "index out of range"