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/2006-February/061299.html below:

[Python-Dev] Proposal: defaultdict

[Python-Dev] Proposal: defaultdict [Python-Dev] Proposal: defaultdict"Martin v. Löwis" martin at v.loewis.de
Sat Feb 18 00:07:48 CET 2006
Adam Olsen wrote:
> You could pass a float in as well.  But if the function is documented
> as taking a dict, and the programmer expects a dict.. that now has to
> be changed to "dict without a default".  Or they have to code
> defensively since d[key] may or may not raise KeyError, so they must
> avoid depending on it either way.

Can you give an example of real, existing code that will break
if a such a dict is passed?

Regards,
Martin
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