JuliaMath / JuliaMath/IntervalSets.jl

More compact `show` method when compact=true

Open
#204 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
109
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Current behavior when `show`ing in compact mode is:
```julia
julia> a, b = sort(randn(2));
julia> show(stdout, MIME("text/plain"), a)
0.320887685039538
julia> show(stdout, MIME("text/plain"), a..b)
0.320887685039538 .. 0.5714203688563335
julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), a)
0.320888
julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), a..b)
0.320888 .. 0.57142
```
This is great, only for the last case, I wish the spaces before and after the `..` were eliminated, so that we would instead have

```julia
julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), a..b)
0.320888..0.57142
```

Similarly, I would want spaces eliminated for compact printing of `OpenInterval`s:
```julia
julia> show(IOContext(stdout, :compact=>true), MIME("text/plain"), OpenInterval(a, b))
0.320888..0.57142(open)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.