Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in(::Missing, ::Any) inconsistency #54407

Open
nsajko opened this issue May 8, 2024 · 1 comment
Open

in(::Missing, ::Any) inconsistency #54407

nsajko opened this issue May 8, 2024 · 1 comment
Labels
domain:collections Data structures holding multiple items, e.g. sets domain:missing data Base.missing and related functionality needs decision A decision on this change is needed

Comments

@nsajko
Copy link
Contributor

nsajko commented May 8, 2024

julia> missing ∈ ()
false

julia> missing ∈ (7,)
missing

julia> missing ∈ Set(7)
false

julia> missing ∈ []
false

julia> missing ∈ [7]
missing

julia> missing ∈ Int[]
false

julia> versioninfo()
Julia Version 1.12.0-DEV.489
Commit 29ced9e2a02 (2024-05-08 07:57 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-17.0.6 (ORCJIT, znver2)
Threads: 6 default, 0 interactive, 6 GC (on 8 virtual cores)

Currently behaves in a weird manner when it's first argument is missing. It sometimes returns missing and sometimes false. But I guess it never returns true. The result depends both on collection type and emptiness status.

Some of these results are featured in the doc string...

@nsajko nsajko added needs decision A decision on this change is needed domain:missing data Base.missing and related functionality domain:collections Data structures holding multiple items, e.g. sets labels May 8, 2024
@martinholters
Copy link
Member

But I guess it never returns true.

julia> missing  [missing]
missing

julia> missing  Set([missing])
true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:collections Data structures holding multiple items, e.g. sets domain:missing data Base.missing and related functionality needs decision A decision on this change is needed
Projects
None yet
Development

No branches or pull requests

2 participants