HDF5.jl
HDF5.jl copied to clipboard
Make `DataFile <: Associative{String,T}`
The interface is already dictionary like, as the docs say, but it's different in ways that make it harder to remember. So, we should go ahead and make DataFile (the supertype of HDF5File and others). I think the following is a good start:
- [x] add
keys, deprecatenames(https://github.com/JuliaIO/HDF5.jl/pull/698) - [x] add
haskey, deprecateexists(https://github.com/JuliaIO/HDF5.jl/pull/694) - [ ] add iteration providing
k=>vPairs - [ ] add
values,keytype,valtype,getkey(or just test that Base implemention works and has wide enough signature) - [ ]
isemptyandlengthare already defined I think - [ ] for
get!,pop!anddelete!either don't implement, or make them provide a clear not implemented error - [ ] does
get(collection, key, default)make sense? It feels wrong. - [ ] should
T(keytype) beAnyor tighter?
Does this seem reasonable? If so, I'm happy to submit a PR.
This got brought up again in https://github.com/JuliaIO/HDF5.jl/issues/590
I think we should work towards this
First two on the list have PRs addressing them
Now that we have deprecated names to keys. What should we do with name ? It feels kinda "left" out. I'm also similarly uncomfortable with the filename function.