Skip to content

more verbose show method for ranges? #59016

@ericphanson

Description

@ericphanson

I think ranges could show with the number of elements, at least for 3-arg show (or compact is false, I never totally know when each is appropriate). I'm imagining something like:

julia> 5:1
5:4 (empty range)

julia> 5:-0.1:1
5.0:-0.1:1.0 (41 elements)

I think this would mitigate the confusion of empty ranges with various endpoints (like #59011) and just be generally a bit helpful when you have more complicated ranges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    display and printingAesthetics and correctness of printed representations of objects.rangesEverything AbstractRange

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions