[Python-3000] remove tuple exceptions?

Collin Winter collinw at gmail.com
Sat Mar 3 00:16:45 CET 2007


On 3/2/07, Jim Jewett <jimjjewett at gmail.com> wrote:
> What is the reasoning behind allowing the raise of a tuple -- but
> really only raising its (recursively) first element?
>
> It seems to have been added (with different spelling) in 1991 (rev
> 2625) as the only alternative to string exceptions.  (You couldn't
> raise a class or instance.)  I assume it was kept for backwards
> compatibility.
>
> Were there other reasons, or should this be removed in python 3?

PEP 3109 already talks about removing this in Python 3. This will
bring "raise" into line with generator.throw(), which already
disallows this.

Collin Winter


More information about the Python-3000 mailing list