call site 1 for code.Traceback.__init__
code/testing/test_excinfo.py - line 19
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
   def test_excinfo_getstatement():
       def g():
           raise ValueError
       def f():
           g()
       try:
           f()
       except ValueError:
->         excinfo = py.code.ExceptionInfo()
       linenumbers = [f.func_code.co_firstlineno-1+3,
                      f.func_code.co_firstlineno-1+1,
                      g.func_code.co_firstlineno-1+1,]
       l = list(excinfo.traceback)
       foundlinenumbers = [x.lineno for x in l]
       print l[0].frame.statement
       assert foundlinenumbers == linenumbers
code/excinfo.py - line 22
10
11
12
13
14
15
16
17
18
19
20
21
22
   def __init__(self, tup=None, exprinfo=None):
       # NB. all attributes are private!  Subclasses or other
       #     ExceptionInfo-like classes may have different attributes.
       if tup is None:
           tup = sys.exc_info()
           if exprinfo is None and isinstance(tup[1], py.magic.AssertionError):
               exprinfo = tup[1].msg
               if exprinfo and exprinfo.startswith('assert '):
                   self._striptext = 'AssertionError: '
       self._excinfo = tup
       self.type, self.value, tb = self._excinfo
       self.typename = str(self.type)
->     self.traceback = py.code.Traceback(tb)