Version française
Home     About     Download     Resources     Contact us    
Browse thread
Hashtable iter/remove
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Hashtable iter/remove
> Hashtables are mutable objects. What happens if 
> I iterate over a hashtable, applying Hashtble.remove
> to (some of) the elements? Will this work? 

It will work in the sense that nothing will crash and you hashtable
will remain in a consistent state.  However, some of the (key,data)
pairs you removed with Hashtbl.remove may still be presented later to
your iterated function.

- Xavier Leroy