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

[Python-Dev] dict containment annoyance

[Python-Dev] dict containment annoyance [Python-Dev] dict containment annoyanceGuido van Rossum guido at python.org
Mon Aug 14 03:49:29 CEST 2006
On 8/13/06, Scott Dial <scott+python-dev at scottdial.com> wrote:
> FWIW, I think the logic of swallowing the TypeError is completely
> reasonable.

Then you haven't debugged enough Python programs.

Swallowing an exception of *any* kind is always a trap waiting to shut
when you least expect it, because you have no control over what other
operations might cause an exception.

E.g. when you write

try:
  hash(x)
except TypeError:
  # apparently x is not hashable

then you're also swallowing any type errors in the computation of a
legitimate hash function.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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