can't delete from a dictionary in a loop
bruno.desthuilliers at gmail.com
bruno.desthuilliers at gmail.com
Fri May 16 17:38:30 EDT 2008
On 16 mai, 23:34, "bruno.desthuilli... at gmail.com"
<bruno.desthuilli... at gmail.com> wrote:
> On 16 mai, 23:28, Hans Nowak <zephyrfalcon!NO_SP... at gmail.com> wrote:
>
>
> > Dan Upton wrote:
> > > for pid in procs_dict:
(snip)
> > for pid in procs_dict.keys():
>
> I'm afraid this will do the same exact thing. A for loop on a dict
> iterates over the dict keys, so both statements are strictly
> equivalent from a practical POV.
Hem. Forget it. I should think twice before posting - this will
obviously make a big difference here. Sorry for the noise.
More information about the Python-list
mailing list