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.has_key(k) d.fromkeys(...) d.setdefault(...) k in d
Oh, and d.pop(k) -- ~Ethan~ _______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com