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

Spatting of tuples of arrays concatenates arrays #10401

Closed
kmsquire opened this issue Mar 4, 2015 · 2 comments
Closed

Spatting of tuples of arrays concatenates arrays #10401

kmsquire opened this issue Mar 4, 2015 · 2 comments

Comments

@kmsquire
Copy link
Member

kmsquire commented Mar 4, 2015

Examples:

julia> a = ([1,2,3], [4,5,6])
([1,2,3],[4,5,6])

julia> [a...]
WARNING: [a,b] concatenation is deprecated; use [a;b] instead
 in depwarn at ./deprecated.jl:40
 in oldstyle_vcat_warning at ./abstractarray.jl:26
 in vect at abstractarray.jl:29
6-element Array{Int64,1}:
 1
 2
 3
 4
 5
 6

julia> data_in = ("hello", 23, 2.7, (), [], (1,8))
("hello",23,2.7,(),None[],(1,8))

julia> [data_in...]  #missing [] from output
5-element Array{Any,1}:
   "hello"
 23
  2.7
   ()
   (1,8)

The deprecation warning is for v0.4, but v0.3 has the same behavior (minus the deprecation warning).

In hindsight, this could probably have been predicted from the current behavior... I just find it surprising.

Related: #10338 (and possibly can be absorbed there?)

Cc: @Jutho

@simonster
Copy link
Member

Presumably when [a, b] ceases to concatenate after the deprecation period (#8599), this won't concatenate either.

@kmsquire
Copy link
Member Author

kmsquire commented Mar 4, 2015

Presumably, yes. I'll close this then--it doesn't seem like it's affected anyone until now, and should be handled properly in 0.5 (or whenever).

@kmsquire kmsquire closed this as completed Mar 4, 2015
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

2 participants