[Python-3000] PEP 3134 exception reporting

Georg Brandl g.brandl at gmx.net
Sun Jun 22 11:07:10 CEST 2008


Antoine Pitrou schrieb:

> 3) Optional question: should be harmonize traceback formatting between built-in
> reporting and reporting through traceback.py? Right now there is a small 
> discrepancy in code lines indentation, see:
> 
> With built-in reporting:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "f.py", line 22, in raise_cause
> inner_raise_cause()
>   File "f.py", line 13, in inner_raise_cause
> raise KeyError from e
> KeyError
> 
> With traceback.py:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "f.py", line 22, in raise_cause
>     inner_raise_cause()
>   File "f.py", line 13, in inner_raise_cause
>     raise KeyError from e
> KeyError

This is how it should be, since 2.x does it like this for built-in and
traceback.

Georg


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-3000 mailing list