Skip to content
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

showcompact() docstring outdated? #25765

Closed
nalimilan opened this issue Jan 26, 2018 · 4 comments
Closed

showcompact() docstring outdated? #25765

nalimilan opened this issue Jan 26, 2018 · 4 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. docs This change adds or pertains to documentation

Comments

@nalimilan
Copy link
Member

The docstring for showcompact still says that it's used to avoid repeating type information, but AFAIK this is no longer the case since we now use the typeinfo property for that (#24651).

@rfourquet Is that right?

help?> showcompact
search: showcompact

  showcompact(x)
  showcompact(io::IO, x)

  Show a compact representation of a value to io. If io is not specified, the
  default is to print to STDOUT.

  This is used for printing array elements without repeating type information
  (which would be redundant with that printed once for the whole array), and
  without line breaks inside the representation of an element.

  To offer a compact representation different from its standard one, a custom
  type should test get(io, :compact, false) in its normal show method.
@nalimilan nalimilan added docs This change adds or pertains to documentation display and printing Aesthetics and correctness of printed representations of objects. labels Jan 26, 2018
@stevengj
Copy link
Member

Should we just deprecate showcompact in favor of show(IOContext(io, .....appropriate options....), x)?

@nalimilan
Copy link
Member Author

That would make sense. showcompact is not really meant to be called directly AFAIK.

@rfourquet
Copy link
Member

@rfourquet Is that right?

Yes

@nalimilan
Copy link
Member Author

Filed #26080 to deprecate showcompact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

4 participants