-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parseable repr
for undef
#33211
Parseable repr
for undef
#33211
Conversation
undef
show to MIME"text/plain"repr
for undef
I'd appreciate being advised on:
|
Oops, just commented on exactly this on your other PR. Sorry, a bit behind on PRs and issues :) |
Looks good to me. I think the only question is whether to output |
I slightly prefer and secondly because it is clearer (in the Also this seemed to be prefered by folks at #33204 (comment). ...but i do not feel strongly either way. |
Ok, I'm convinced :) |
This PR now results in: julia> undef
UndefInitializer(): array initializer with undefined values
julia> repr(undef)
"UndefInitializer()"
julia> fill(undef, 2)
2-element Array{UndefInitializer,1}:
UndefInitializer()
UndefInitializer()
julia> Vector(undef, 2)
2-element Array{Any,1}:
#undef
#undef |
Should probably have a NEWS entry. |
Ah, sorry! Since this was already merged, there's a separate PR to add news: #33254 |
undef
does not have parseablerepr
#33204WIP becuase not sure which tests will need updatingjulia> undef array initializer with undefined values
show
/repr
) -- which is the motivation for the change