[issue42546] copy - Allow .copy(deep=True) alongside .deepcopy() for easier usage and zen

2020-12-02 Thread Daniel Rose


New submission from Daniel Rose :

It would be convenient and cleaner/more in line with the Python zen to allow 
`.copy()` to allow a `deep=True` argument, to use `.deepcopy()` in a simpler 
way. This is easier to read, and brings some more usefulness to `.copy()`. 
`.deepcopy()` would be kept for backwards compatibility.

--
components: Library (Lib)
messages: 382338
nosy: TheCatster
priority: normal
severity: normal
status: open
title: copy - Allow .copy(deep=True) alongside .deepcopy() for easier usage and 
zen
type: enhancement
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue42546>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42546] copy - Allow dict.copy(deep=True) alongside copy.deepcopy() for easier usage and zen

2020-12-02 Thread Daniel Rose


Change by Daniel Rose :


--
title: copy - Allow .copy(deep=True) alongside .deepcopy() for easier usage and 
zen -> copy - Allow dict.copy(deep=True) alongside copy.deepcopy() for easier 
usage and zen

___
Python tracker 
<https://bugs.python.org/issue42546>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42546] copy - Allow dict.copy(deep=True) alongside copy.deepcopy() for easier usage and zen

2020-12-02 Thread Daniel Rose


Daniel Rose  added the comment:

My apologies. I worded that wrong, I meant adding `deep=True` to `dict.copy()`. 
Otherwise, you're absolutely right.

--

___
Python tracker 
<https://bugs.python.org/issue42546>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com