Barry Warsaw <barry at python.org> writes: > However, .setdefault() is a horrible name because it's not clear > from the name that a 'get' operation also happens. Agreed! From the name, a clever but naive user would assume that "setdefault" sets what value the dictionary returns when a key does not exist. On first encountering the name, one imagines: >>> d = {} >>> d[1] KeyError: 1 >>> d.setdefault('missing') >>> d[1] 'missing' -- Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon