[Python-ideas] clear() method for lists
grosser.meister.morti at gmx.net
Thu Feb 11 19:19:49 CET 2010
On 02/11/2010 06:35 PM, Gerald Britton wrote:
> Switching gears for a moment, what is the feeling regarding the copy()
> methods for dictionaries and sets? Are they truly redundant? Should
> they be deprecated? Should users be encouraged to use the copy module
> or just use "newdict = dict(olddict)" and "newset = set(oldset)" to
> build a new dictionary or set from an existing one?
I don't know what one *should* do but I never used .copy() but always
dict(olddict) or set(oldset).
More information about the Python-ideas