I have a very strange worries, with this way:
for k, v in ((k, v) for k, v in mydict.iteritems() if v.update):
print k
del mydict[k]
I know perfectly well that we should not change the key of the dictionary during iteration. But I was expecting a "RuntimeError: dictionary changed size during iteration" and nothing. I sometimes get a value, sometimes nothing ...
Python v2.7.10 on Osx