[issue11007] stack tracebacks should give the relevant class name

Skip Montanaro report at bugs.python.org
Tue Jan 25 19:30:44 CET 2011


Skip Montanaro <skip at pobox.com> added the comment:

Given this code:

#!/usr/bin/env python

class C:
    def bomb(self):
        1/0

c = C()
c.bomb()

when run it produces

Traceback (most recent call last):
  File "<stdin>", line 8, in <module>
  File "<stdin>", line 5, in bomb
ZeroDivisionError: integer division or modulo by zero

You would like "bomb" to be "C.bomb"?

----------
nosy: +skip.montanaro

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11007>
_______________________________________


More information about the Python-bugs-list mailing list