Re: Having trouble deleting objects from a list...

2005-10-19 Thread Mike Meyer
Jason Stitt <[EMAIL PROTECTED]> writes: > On Oct 19, 2005, at 8:16 PM, KraftDiner wrote: > 'for obj in self.objList' will keep right on iterating through the > list even if you don't increment i. And if you modify self.objList while you're iterating over it, the results are undefined. > A direct

Re: Having trouble deleting objects from a list...

2005-10-19 Thread Jason Stitt
On Oct 19, 2005, at 8:16 PM, KraftDiner wrote: > I have a list, and within it, objects are marked for deletion. > However when I iterate through the list to remove objects > not all the marked objects are deleted.. > here is a code portion: > > i = 0 > for obj in self.objLis

Having trouble deleting objects from a list...

2005-10-19 Thread KraftDiner
I have a list, and within it, objects are marked for deletion. However when I iterate through the list to remove objects not all the marked objects are deleted.. here is a code portion: i = 0 for obj in self.objList: i