This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients Massimiliano Culpo, docs@python, skrah, steven.daprano
Date 2017-12-12.13:05:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513083925.1.0.213398074469.issue32288@psf.upfronthosting.co.za>
In-reply-to
Content
I see the first issue now and I agree that Python behaves strangely.

Numpy
=====

>>> x = array([1,2,3])
>>> x[1:2] = [1,2,3,4,5]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: cannot copy sequence with size 5 to array axis with dimension 1


Python
======

>>> lst = [1,2,3]
>>> lst[1:2] = [1,2,3,4,5]
>>> lst
[1, 1, 2, 3, 4, 5, 3]
History
Date User Action Args
2017-12-12 13:05:25skrahsetrecipients: + skrah, steven.daprano, docs@python, Massimiliano Culpo
2017-12-12 13:05:25skrahsetmessageid: <1513083925.1.0.213398074469.issue32288@psf.upfronthosting.co.za>
2017-12-12 13:05:25skrahlinkissue32288 messages
2017-12-12 13:05:25skrahcreate