News for hackers. Stuff that matters.
Re:Bruce Eckel announces he's going to write Atomic Python by Animats on Thursday September 03, 2015 @03:37AM (#10163732)
Is there some language where [4,6] is the output?

Yes. Python:

    >>> x = numpy.array([1,2])
    >>> y = numpy.array([3,4])
    >>> x + y
    array([4, 6])
For extra fun:

    >>> x + [3,4]
    array([4, 6])
    >>> [1,2] + y
    array([4, 6])
but, of course:

    >>> [1,2] + [3,4]
    [1, 2, 3, 4]

There are no comments on this comment yet.