-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Clarify difference between copy.copy() and the copy() methods #150636
Copy link
Copy link
Closed
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dir
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dir
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Status
Todo
The
copymodule documentation mentiondict.copy()and list slicing as yet one way of making slice copies. This is true, but there is a subtle difference.dict.copy()returns the instance ofdictwhen copying an instance of thedictsubclass, unless it overrides thecopy()method. The same for slicing.Linked PRs