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 steven.daprano
Recipients Domenico Barbieri, steven.daprano
Date 2019-02-26.09:21:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551172885.24.0.108038861455.issue36118@roundup.psfhosted.org>
In-reply-to
Content
I cannot reproduce the behaviour you show.

First problem: ``...`` is a legal Python object, Ellipsis, so your example code literally means:

# x = [["a", "b", ... , "BZ"]]

x is a list containing one sublist, which contains exactly four objects.

So when I run your code as you write it, I get:

py> x = [["a", "b", ... , "BZ"]]
py> y = [[], [1,2,3,4,5, ... , 99]]
py> y[0] = x[0]
py> print(y[0])
['a', 'b', Ellipsis, 'BZ']


which is exactly what I expect.

If we use more than 45 entries, as you suggest, I still cannot reproduce your bug report:


py> x = [ list(range(0, 100)) ]
py> y = [ [], list(range(1000, 1200)) ]
py> assert len(x[0]) > 45
py> assert len(y[1]) > 45
py> y[0] = x[0]
py> print(y[0])
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]

which is exactly the behaviour I expect.


The above is using Python 3.5.


I suggest you start from a fresh interpreter session and show precisely what steps needed to reproduce the behaviour you are seeing, and show the behaviour you expect. It might help to read this:

http://www.sscce.org/
History
Date User Action Args
2019-02-26 09:21:25steven.dapranosetrecipients: + steven.daprano, Domenico Barbieri
2019-02-26 09:21:25steven.dapranosetmessageid: <1551172885.24.0.108038861455.issue36118@roundup.psfhosted.org>
2019-02-26 09:21:25steven.dapranolinkissue36118 messages
2019-02-26 09:21:24steven.dapranocreate