dict.setdefault()

Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Mon Apr 25 10:23:20 EDT 2011


Am 12.04.2011 04:58, schrieb rantingrick:

> That's sounds good MRAB! After you mentioned this i had an epiphany...
> why not just add an extra argument to dict.update?
>
>>>> dict.update(D, clobberexistingkeys=False)

This is AFAICS inconsistent to the possibility to do dict.update(a, 
k1=v1, k2=v2).

Then you cannot set the key clobberexistingvalues to False via the 
update method any longer...


Thomas



More information about the Python-list mailing list