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/2014-March/132948.html below:

[Python-Dev] PEP 463: Exception-catching expressions

[Python-Dev] PEP 463: Exception-catching expressions [Python-Dev] PEP 463: Exception-catching expressionsGreg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 6 06:47:28 CET 2014
Steven D'Aprano wrote:
>     Return the value for key if key is in the dictionary, else default.
>     If default is not given, it defaults to None, so that this method 
>     never raises a KeyError.

I think that's supposed to mean that it won't raise
KeyError as a result of the key not being in the
dictionary. The actual behaviour is correct, IMO,
because it avoids masking bugs, so this could probably
be worded better.

-- 
Greg
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