Skip to content

Conversation

@NHDaly
Copy link
Member

@NHDaly NHDaly commented Nov 13, 2020

Before:

julia> module M
          var"#f#"(x) = x+5
       end
Main.M

julia> M.var"#f#"

julia> show(stdout, M.var"#f#")
Main.M.#f#

After:

julia> module M
          var"#f#"(x) = x+5
       end
Main.M

julia> M.var"#f#"

julia> show(stdout, M.var"#f#")
Main.M.var"#f#"

Without this, the result of show() is not valid, interpretable julia.

This is similar to #38049, but
acts on julia's show method, rather than C's static_show().

This brings Base.show() in line with the same behavior. :)

Before:
```julia
julia> module M
          var"#f#"(x) = x+5
       end
Main.M

julia> M.var"#f#"

julia> show(stdout, M.var"#f#")
Main.M.#f#
```

After:
```julia
julia> module M
          var"#f#"(x) = x+5
       end
Main.M

julia> M.var"#f#"

julia> show(stdout, M.var"#f#")
Main.M.var"#f#"
```

Without this, the result of `show()` is not valid, interpretable julia.
Copy link
Member

@simeonschaub simeonschaub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@JeffBezanson JeffBezanson merged commit 9ecc1f2 into JuliaLang:master Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants