Suppose that I use Parameters.jl
and the following @with_kw
structure:
using Parameters
using Dates
@with_kw struct Params @deftype Int
#PARAMETERS
foo = 5
bar::Dict{String,Int} = Dict("a"=>0,"b"=>1)
time_limit::Period = Minute(30)
end
When creating an instance of this struct:
pars = Params()
When printing print(pars)
, I get the following:
Params
foo: Int64 5
bar: Dict{String, Int64}
time_limit: Minute
Which is fine for foo
but not for bar
and time_limit
.
I would prefer (and also expect) the following that I hand typed:
Params
foo: Int64 5
bar: Dict{String, Int64} Dict{String, Int64} with 2 entries:
"b" => 1
"a" => 0
time_limit: Minute 30 minutes
Is that easily achievable? Why is the default printing method for a @with_kw struct does not display with details every types of variables?