[issue45752] copy module doc wrongly says it doesn't copy arrays

Stefan Pochmann report at bugs.python.org
Mon Nov 8 11:53:12 EST 2021


New submission from Stefan Pochmann <stefan.pochmann at gmail.com>:

The doc https://docs.python.org/3/library/copy.html says:

"This module does not copy types like module, method, stack trace, stack frame, file, socket, window, array, or any similar types."

But it does copy arrays just fine:

import copy, array
a = array.array('i', [1, 2])
b = copy.copy(a)
a[0] = 3
print(a)
print(b)

Output:

array('i', [3, 2])
array('i', [1, 2])

----------
assignee: docs at python
components: Documentation
messages: 405962
nosy: Stefan Pochmann, docs at python
priority: normal
severity: normal
status: open
title: copy module doc wrongly says it doesn't copy arrays
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45752>
_______________________________________


More information about the Python-bugs-list mailing list