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

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

[Python-Dev] PEP 463: Exception-catching expressions [Python-Dev] PEP 463: Exception-catching expressionsChris Angelico rosuav at gmail.com
Fri Feb 21 16:41:21 CET 2014
On Sat, Feb 22, 2014 at 1:22 AM, Rob Cliffe <rob.cliffe at btinternet.com> wrote:
> Small point: in one of your examples you give a plug for the PEP "note the
> DRY improvement".
> I would suggest that similarly
>     perhaps in your Lib/tarfile.py:2198 example you point out the increase
> in readability due to the 2 lines lining up
>     in your Lib/ipaddress.py:343 example you point out that the new form is
> probably an improvement (i.e. probably closer to the author's intention) as
> it will NOT catch an AttributeError evaluating "ips.append" (this would
> matter e.g. if "append" were mis-spelt).  YOU are clearly aware of this but
> it would often escape the casual reader.

Sure. Added a paragraph down the bottom of the section explaining the
benefit of the narrowed scope.

ChrisA
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