Do we have something like
nt = (a = 1, b = 2, c = 3, d = 4, e = 5)
@some_macro a, c, d = nt
resulting in the creation of local variables
a = nt.a
c = nt.c
d = nt.d
somewhere? NamedTuple deconstruction that extracts values by name?
Do we have something like
nt = (a = 1, b = 2, c = 3, d = 4, e = 5)
@some_macro a, c, d = nt
resulting in the creation of local variables
a = nt.a
c = nt.c
d = nt.d
somewhere? NamedTuple deconstruction that extracts values by name?
Something like:
julia> nt = (a = 1, b = 2, c = 3, d = 4, e = 5)
julia> using Parameters
julia> @unpack a, c, d = nt # (a = 1, b = 2)
julia> a # 1
julia> c # 3
Oh, Parameters.@unpack, of course! Thanks!