[issue16890] minidom error

2013-01-08 Thread Javier Domingo
Javier Domingo added the comment: Ok, sorry then. Javier Domingo 2013/1/8 Ezio Melotti > > Ezio Melotti added the comment: > > It happens with lists too: > >>> l = list(range(10)) > >>> for x in l: > ... l.remove(x) > ... > >>> l > [1, 3, 5, 7, 9] > > -- > > __

[issue16890] minidom error

2013-01-08 Thread Ezio Melotti
Ezio Melotti added the comment: It happens with lists too: >>> l = list(range(10)) >>> for x in l: ... l.remove(x) ... >>> l [1, 3, 5, 7, 9] -- ___ Python tracker ___ __

[issue16890] minidom error

2013-01-08 Thread Javier Domingo
Javier Domingo added the comment: I know that is the problem, but that shouldn't happen! if you remove a item from a list, that doesn't happen. That is why I tagged the error as minidom's El 08/01/2013 04:24, "Ezio Melotti" escribió: > > Ezio Melotti added the comment: > > The problem is that y

[issue16890] minidom error

2013-01-07 Thread Ezio Melotti
Ezio Melotti added the comment: The problem is that you are mutating parent.childNodes while you are iterating on it. Iterating over a copy seems to solve the problem. -- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior

[issue16890] minidom error

2013-01-07 Thread Javier Domingo
New submission from Javier Domingo: Hi I found something like a bug, I can't get this working: import xml.dom.minidom as minidom document=""" """ dom = minidom.parseString(document) dom.childNodes dom.childNodes[0].childNodes dom.childNodes[0].childNodes[1].childNod