A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-October/129235.html below:

[Python-Dev] PEP 455: TransformDict

[Python-Dev] PEP 455: TransformDict [Python-Dev] PEP 455: TransformDictEthan 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.has_key(k)
>    d.fromkeys(...)
>    d.setdefault(...)
>    k in d

Oh, and

      d.pop(k)

--
~Ethan~
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4