The copy module documentation mention dict.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 of dict when copying an instance of the dict subclass, unless it overrides the copy() method. The same for slicing.
Linked PRs
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