A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-October/150027.html below:

[Python-Dev] The type of the result of the copy() method

[Python-Dev] The type of the result of the copy() methodSerhiy Storchaka storchaka at gmail.com
Sun Oct 29 11:19:40 EDT 2017
The copy() methods of list, dict, bytearray, set, frozenset, 
WeakValueDictionary, WeakKeyDictionary return an instance of the base 
type containing the content of the original collection.

The copy() methods of deque, defaultdict, OrderedDict, Counter, 
ChainMap, UserDict, UserList, WeakSet, ElementTree.Element return an 
instance of the same type as the original collection.

The copy() method of mappingproxy returns a copy of the underlying 
mapping (using its copy() method).

os.environ.copy() returns a dict.

Shouldn't it be more consistent?

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4