bug/poor tracebacks while importing code

Mark McEahern marklists at mceahern.com
Wed Oct 2 20:13:33 CEST 2002

The code I previously posted was wrong--I was typing it by-hand instead of
copying it into the message:

$ cat a.py
import b

$ cat b.py
def foo():
        x = 1/0
    except ValueError, e:


$ python a.py
Traceback (most recent call last):
  File "a.py", line 1, in ?
    import b
  File "b.py", line 7, in ?
  File "b.py", line 3, in foo
    x = 1/0
ZeroDivisionError: integer division or modulo by zero

More information about the Python-list mailing list