Randy Zwitch
unread,Aug 7, 2013, 2:49:09 PM8/7/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia...@googlegroups.com
Reading through documentation, it isn't really clear to me what the difference between push! and append! is. Meaning, coming from a Python background, I would've expected the behavior of push! to be named append!, as in Python:
Python:
In [3]: nums = [1,1]
In [4]: nums.append(2)
In [5]: nums
Out[5]: [1, 1, 2]
Julia
julia> nums = [1,1]
2-element Int64 Array:
1
1
julia> append!(nums, 2)
ERROR: no method append!(Array{Int64,1},Int64)
julia> push!(nums, 2)
3-element Int64 Array:
1
1
2
What am I appending when I use append! and not push!, another object?