Eduardo O. Padoan wrote:
On Fri, May 16, 2008 at 6:40 PM, Gary Herron <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
On 16 mai, 23:28, Hans Nowak <[EMAIL PROTECTED]> wrote:

Dan Upton wrote:
  <<asking about iterating over a dictionary and deleting elements>>
...to solve the immediate problem:
  for pid in procs_dict.keys():
And then, in Python3, keys() produces something else altogether (call a view
of the dictionary) which would provoke the same problem, so yet another
solution would have to be found then.
In Python 3.0, list(procs_dict.keys()) would have the same effect.
Or (simpler in either 3.0 or 2.X):
    for pid in list(procs_dict):
        ...

--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to