show([io::IO = stdout], x), the keyword argument is not at the end?

help?> show
search: show showable showerror @show @showtime Cshort Cushort hasmethod searchsorted searchsortedlast searchsortedfirst

  show([io::IO = stdout], x)

  Write a text representation of a value x to the output stream io. New types T should overload show(io::IO, x::T). The representation used by show generally        
  includes Julia-specific formatting and type information, and should be parseable Julia code when possible.

  repr returns the output of show as a string.

I am confused. The square brackt means the argument ‘io’ has a default value, right? Is it also a keyword argument? A keyword argument should be placed to the right of the position arguments, right?

It’s not a keyword argument and the doc syntax isn’t actual Julia syntax. It means that the first argument, which happens to be named io, is optional and defaults to stdout.

2 Likes