You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been finding OrderedDict( . . .) a bit too bulky and also you have to always use OrderedCollections, and so I use Dict instead as I don't care about the order of the attributes. But Dict is still a bit bulky including the fact you have to quote the name of the attribute. I would think that NamedTuple is ideally suited for attributes:
Because we wouldn't have thousands of attributes, we don't need the performance of Dict. (If anything, I guess that NamedTuple is a bit more performant for a small number of attributes. Not that performance matters, though.)
(But, looking at the error message when I used a NamedTuple, I guess I should request OrderedDict to be able to be initialized with a NamedTuple?)
[As an aside, it would also be nice if Dict(:units => "m/s") be accepted. Your IDE will color a Symbol differently from a String, which makes the key-value pair more readable (unless you have a Symbol value :-). ]
The text was updated successfully, but these errors were encountered:
Describe the problem
NCDatasets v0.13.1
I've been finding
OrderedDict( . . .)
a bit too bulky and also you have to alwaysuse OrderedCollections
, and so I useDict
instead as I don't care about the order of the attributes. ButDict
is still a bit bulky including the fact you have to quote the name of the attribute. I would think that NamedTuple is ideally suited for attributes:Because we wouldn't have thousands of attributes, we don't need the performance of
Dict
. (If anything, I guess that NamedTuple is a bit more performant for a small number of attributes. Not that performance matters, though.)(But, looking at the error message when I used a NamedTuple, I guess I should request
OrderedDict
to be able to be initialized with a NamedTuple?)[As an aside, it would also be nice if
Dict(:units => "m/s")
be accepted. Your IDE will color a Symbol differently from a String, which makes the key-value pair more readable (unless you have a Symbol value :-). ]The text was updated successfully, but these errors were encountered: