On 3/19/07, Georg Brandl <[EMAIL PROTECTED]> 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/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to