[Python-3000] A request to keep dict.setdefault() in 3.0

Barry Warsaw barry at python.org
Tue Jul 10 00:14:33 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jul 9, 2007, at 5:04 PM, Guido van Rossum wrote:

> On 7/9/07, Barry Warsaw <barry at python.org> wrote:
>> Phillip, I support any initiative to keep .setdefault() or similar
>> functionality.  When this thread came up before, I wasn't against
>> defaultdict, I just didn't think it covered enough of the use cases
>> of .setdefault() to warrant its removal.  You describe some
>> additional use cases.
>>
>> However, .setdefault() is a horrible name because it's not clear from
>> the name that a 'get' operation also happens.
>
> We had a long name discussion when it was introduced. Perhaps we can
> go back to the list suggested then and see if a better alternative was
> overlooked?

Don't look here because some big dummy contradicts himself seven  
years later:

http://mail.python.org/pipermail/python-dev/2000-August/007819.html

hmm-put()-ly y'rs,
- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQCVAwUBRpKzSXEjvBPtnXfVAQKRmQP8DZDYKFOhOjYvtf+OkmmgAnwWaOI5tpPv
kHHxtMGPdgEM3cXAdT0U5m04W1IUmMKBItV/JE4qGO4OdD0eFIUPaZBufVUIIg3b
230qJnamVWrzZ/uRUhgDK363Kt2NstrxKce+kX37FPy2qHUSu3RMiBpzx9NJBW8I
P3rjaqYZycg=
=cU+w
-----END PGP SIGNATURE-----


More information about the Python-3000 mailing list