We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I just realized that we don't have a hasproperty(x, s) function, analogous to haskey. We could define one with the default definition:
hasproperty(x, s)
haskey
hasproperty(x, s::Symbol) = s in propertynames(x)
This came up in https://github.com/JuliaPy/PyCall.jl/pull/517/files#r212317623
The text was updated successfully, but these errors were encountered:
Relatedly, a hasfield function to accompany getfield/setfield! may be nice. This definition actually works for that:
hasfield
getfield
setfield!
hasfield(T::DataType, name::Symbol) = fieldindex(T, name, false) > 0
Sorry, something went wrong.
Agreed. I think the fallback may be isdefined though.
isdefined
hasproperty
No branches or pull requests
I just realized that we don't have a
hasproperty(x, s)
function, analogous tohaskey
. We could define one with the default definition:This came up in https://github.com/JuliaPy/PyCall.jl/pull/517/files#r212317623
The text was updated successfully, but these errors were encountered: