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/2005-July/054532.html below:

[Python-Dev] List copy and clear (was Re: Inconsistent API for sets.Set and build-in set)

[Python-Dev] List copy and clear (was Re: Inconsistent API for sets.Set and build-in set) [Python-Dev] List copy and clear (was Re: Inconsistent API for sets.Set and build-in set)Nicolas Fleury nidoizo at yahoo.com
Fri Jul 1 01:23:11 CEST 2005
Raymond Hettinger wrote:
> Use copy.copy() for generic copying -- it works across a wide range of
> objects.  Alternatively, use the constructor as generic way to make
> duplicates:
> 
>    dup = set(s)
>    dup = list(l)
>    dup = dict(d)
>    dup = tuple(t)     # note, the duplicate is original object here :-)

I know all this, but why then is there a copy method for sets and 
dictionaries?  What justification is valid for sets and dictionaries 
that doesn't apply to lists?

Regards,
Nicolas

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