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 working on NamedTupleTools#v1, intending to provide a solid, effective, consistent, performant, robust and comfortable API. The #v1 README is currentish with the source code.
Your thoughts, insights, perspectives, and suggestions are most welcome.
Best, Jeffrey Sarnoff
The text was updated successfully, but these errors were encountered:
julia> t = NamedTuple{(:a,)}
NamedTuple{(:a,),T} where T<:Tuple
julia>t(1)
(a =1,)
julia>t((1,))
(a =1,)
julia>t(((1,),))
(a = (1,),)
julia> c =constructorof(typeof((a=1,)))
ConstructionBase.NamedTupleConstructor{(:a,)}()
julia>c(1)
(a =1,)
julia>c((1,))
(a = (1,),)
ConstructionBase.jl also provides setproperties which can be used as setproperties(nt; :b => "cat") instead of setproperty(nt, :b, "cat"). For resetproperty, why not just do (; nt..., :b => "cat")?
Hi @cscherrer @KristofferC @kmsquire @pdeffebach @scls19fr @sethaxen @tkf.
I've been working on NamedTupleTools#v1, intending to provide a solid, effective, consistent, performant, robust and comfortable API. The #v1 README is currentish with the source code.
Your thoughts, insights, perspectives, and suggestions are most welcome.
Best, Jeffrey Sarnoff
The text was updated successfully, but these errors were encountered: