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/2007-March/072109.html below:

[Python-Dev] Two design questions

[Python-Dev] Two design questions [Python-Dev] Two design questionsGuido van Rossum guido at python.org
Mon Mar 19 20:38:46 CET 2007
On 3/19/07, Georg Brandl <g.brandl at gmx.net> wrote:
> I'd like to have opinions on two issues:
>
> Patch #1682205: suggests to remove code that catches a TypeError and raises one
> with a different message if it occurs during iterable unpacking. This can mask
> completely unrelated TypeErrors, while the message in the case that the new
> error describes is already clear enough.

In Py3k, this sounds like a perfect use case for exception chaining
per PEP 344 (assuming the entire chain of frames is printed). Until
then, I agree that raising another exception masking someting as
generic as TypeError is a practice that ought to be limited as much as
possible.

> Bug #1683368: object.__new__ rejects arguments if self.__class__.__init__ is
> object.__init__. Why not simply let object.__init__ do the argument checking
> itself?

I'll think about this some more. In the mean time I've reassigned the
bug to myself.

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