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

Docs inconsistent on string interpolation of arrays #7438

Closed
tkelman opened this issue Jun 27, 2014 · 4 comments
Closed

Docs inconsistent on string interpolation of arrays #7438

tkelman opened this issue Jun 27, 2014 · 4 comments

Comments

@tkelman
Copy link
Contributor

tkelman commented Jun 27, 2014

Someone brought this up on IRC the other day, see this line:

  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3911 (2014-06-27 16:05 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 19582f7 (0 days old master)
|__/                   |  i686-w64-mingw32

julia> v = [1,2,3]
3-element Array{Int32,1}:
 1
 2
 3

julia> "v: $v"
"v: [1,2,3]"

I'm not sure whether this is a regression, or just a change relative to what the docs say ("v: 1\n2\n3\n").

@elextr
Copy link

elextr commented Jun 27, 2014

           _

_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type "help()" to list help topics
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 0.2.1 (2014-02-11 06:30 UTC)
/ |_'|||__'| |
|__/ | x86_64-linux-gnu

julia> v = [1,2,3]
3-element Array{Int64,1}:
1
2
3

julia> "v: $v"
"v: 1\n2\n3\n"

Looks like a regression, old behaviour matches display new behaviour matches show.

The question is which is best/more consistent?

@JeffBezanson
Copy link
Member

The new output is better. We should update the docs.

@tkelman
Copy link
Contributor Author

tkelman commented Jun 28, 2014

Judging by the last commit that touched this line (b995da5), will doctest catch this kind of thing automatically?

@ivarne
Copy link
Member

ivarne commented Jun 29, 2014

I would think that it should, but it seems like nobody is currently running doctest on a regular basis. @nolta

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

No branches or pull requests

4 participants