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 ohwphil, steven.daprano
Date 2021-09-11.03:07:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631329666.83.0.0469254858984.issue45169@roundup.psfhosted.org>
In-reply-to
Content
This is not a bug. No copy is made at all, neither shallow nor deep.

This is described in the documentation for built-in types:

https://docs.python.org/3/library/stdtypes.html#common-sequence-operations

and is similar to the issue in the FAQs:

https://docs.python.org/3/faq/programming.html#id16


I acknowledge that this is sometimes confusing for beginners, but it is just one of those things that programmers have to learn. Sequence multiplication does not copy the items, it replicates references to the same item.
History
Date User Action Args
2021-09-11 03:07:46steven.dapranosetrecipients: + steven.daprano, ohwphil
2021-09-11 03:07:46steven.dapranosetmessageid: <1631329666.83.0.0469254858984.issue45169@roundup.psfhosted.org>
2021-09-11 03:07:46steven.dapranolinkissue45169 messages
2021-09-11 03:07:46steven.dapranocreate