> another thread can remove the key prior to the has_key call; or perhaps > edges isn't a real dictionary? >
of course. But unless there is a way of using threading without being aware of it, this is not the case. Also, edges is definitely a dict (has been declared some lines before, and no obscure functions have been called in the meantime, just some adding to edges). Python would also fail on edges.keys() if edges wasn't a dict... cheers, john -- http://mail.python.org/mailman/listinfo/python-list