Skip to content

Add method +(a::Tuple, b::Tuple) #2754

@milktrader

Description

@milktrader

Concatenating two tuples in Python is simple

In [1]: a = (1,2)

In [2]: b = (3,4)

In [3]: a+b
Out[3]: (1, 2, 3, 4)

Julia though doesn't have this as a method

julia> a = (1,2)
(1,2)

julia> b = (3,4)
(3,4)

julia> a+b
ERROR: no method +((Int64,Int64),(Int64,Int64))

In fact, I still haven't figured out a hack on how to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions