bug in pdb?

Quinn Dunkan quinn at mono.ugcs.caltech.edu
Fri Jan 28 18:03:43 EST 2000


Apparently, pdb makes use of a module called repr (which I think is a
*terrible* name for a module).  When I try to call repr(foo) from pdb, I get
TypeError, and worse, when I try to step over code which _uses_ repr, the
program blows up.

% cat >bug.py
foo = 'baz'
print repr(foo)
^D
% /usr/local/lib/python1.5/pdb.py bug.py
> <string>(0)?()
(Pdb) n
> <string>(1)?()
(Pdb) 
TypeError: 'call of non-...(type module)'
> <string>(1)?()
(Pdb) 
Traceback (innermost last):
  File "/usr/people/web/bin/pdb", line 921, in ?
    run('execfile(' + `filename` + ')')
  File "/usr/people/web/bin/pdb", line 855, in run
    Pdb().run(statement, globals, locals)
  File "/usr/local/lib/python1.5/bdb.py", line 343, in run
    exec cmd in globals, locals
  File "<string>", line 1, in ?
  File "bug.py", line 2, in ?
    print repr(foo)
TypeError: call of non-function (type module)



More information about the Python-list mailing list