I'm uncertain as to whether this kind of construct is well formed
R is a list of instances
for i in R:
if i.id%2: del R[R.index(i)]
or is it better (assuming R holds the only references to the instances)
to do
R=filter((lambda x: x.id%2),R)
--
Robin Becker
R is a list of instances
for i in R:
if i.id%2: del R[R.index(i)]
or is it better (assuming R holds the only references to the instances)
to do
R=filter((lambda x: x.id%2),R)
--
Robin Becker