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

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

[Python-Dev] PEP 463: Exception-catching expressions [Python-Dev] PEP 463: Exception-catching expressionsAntoine Pitrou solipsis at pitrou.net
Sat Feb 22 10:12:48 CET 2014
On Sat, 22 Feb 2014 15:57:02 +0900
"Stephen J. Turnbull" <stephen at xemacs.org> wrote:
> 
>     try:
>         interpolable = func(key)
>     except TypeError:
>         interpolable = "not a string: %s" % key
>     except KeyError:
>         interpolable = "no such key: %s" % key
>     print("Some message that refers to '%s' % interpolable")

I think that's a rare enough case, though (compared to the other idioms
showcased in the PEP), that we needn't care about it.

Regards

Antoine.


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