Showing the method's class in expection's traceback
Duncan Booth
duncan.booth at invalid.invalid
Sun May 25 05:15:45 EDT 2008
"Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> wrote:
> En Thu, 22 May 2008 07:55:44 -0300, Duncan Booth
> <duncan.booth at invalid.invalid> escribió:
>> Bruno Desthuilliers <bruno.42.desthuilliers at websiteburo.invalid>
>> wrote:
>>
>>> Not to say that your concerns are pointless, and that things cannot
>>> be improved somehow, but this is not that trivial, and there may be
>>> ambuiguities in some not so rare cases.
>>
>> It might be worth considering an alternative approach here: a
>> formatted exception includes the relevant source lines (where
>> possible).
>
> Just to note that the standard cgitb module already does that, among
> other things.
>
Anywhere Python prints a traceback already does that. The 'alternative
approach' I was suggesting was the part you snipped, i.e. extracting the
enclosing class name from the source.
More information about the Python-list
mailing list