Fixed: https://github.com/JuliaLang/julia/commit/4164572c53b7c18888ddb104a196d87558576031
On Fri, Oct 23, 2015 at 10:51 AM, Stefan Karpinski <[email protected]> wrote: > It's also a little unclear to me what this method is useful for. > > On Fri, Oct 23, 2015 at 8:53 AM, Stefan Karpinski <[email protected]> > wrote: > >> Ah, this is a bug in that pop! method. I'm working on a fix. >> >> On Fri, Oct 23, 2015 at 8:42 AM, Matt <[email protected]> wrote: >> >>> I want to check if a key is in a set, and pop! it if it is the case. >>> >>> >>> 1. In order to do that, I can rely on a try / catch statement (i.e. try >>> pop!(x, key)) or a default key (i.e. pop!(x, key, nothing)). Is one >>> preferable to the other in term of speed? >>> >>> 2.. pop!(x, key, nothing) returns nothing even if key is in x. Is this >>> expected? >>> >>> >>> nothing == pop!(Set(1:2), 2, nothing) >>> >>> true >>> >>> >>> >> >
