[Python-Dev] PEP 455: TransformDict (original) (raw)

Ethan Furman ethan at stoneleaf.us
Tue Oct 8 01:45:58 CEST 2013


On 10/07/2013 02:55 PM, Ethan Furman wrote:

A key difference (pun unavoidable ;) between missing and transform is that missing is only called when a key is not found, while transform needs to be called /every/ time a key is looked up:

d[k] d.get(k) d.haskey(k) d.fromkeys(...) d.setdefault(...) k in d

Oh, and

  d.pop(k)

-- Ethan



More information about the Python-Dev mailing list