Message213214
Oops. Here the correct example:
>>> class foo:
... def __init__(self):
... foo.bar = "hello"
... def __repr__(self): return foo.bar
...
>>> pdb.runcall(foo)
> <stdin>(3)__init__()
(Pdb) a
Traceback (most recent call last):
File ".\pdb.py", line 1132, in do_args
self.message('%s = %r' % (name, dict[name]))
File "<stdin>", line 4, in __repr__
AttributeError: type object 'foo' has no attribute 'bar'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".\pdb.py", line 1580, in runcall
return Pdb().runcall(*args, **kwds)
File "C:\Python33\lib\bdb.py", line 439, in runcall
res = func(*args, **kwds)
File "<stdin>", line 3, in __init__
File "<stdin>", line 3, in __init__
File "C:\Python33\lib\bdb.py", line 47, in trace_dispatch
return self.dispatch_line(frame)
File "C:\Python33\lib\bdb.py", line 65, in dispatch_line
self.user_line(frame)
File ".\pdb.py", line 266, in user_line
self.interaction(frame, None)
File ".\pdb.py", line 345, in interaction
self._cmdloop()
File ".\pdb.py", line 318, in _cmdloop
self.cmdloop()
File "C:\Python33\lib\cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File ".\pdb.py", line 411, in onecmd
return cmd.Cmd.onecmd(self, line)
File "C:\Python33\lib\cmd.py", line 217, in onecmd
return func(arg)
File ".\pdb.py", line 1134, in do_args
self.message('%s = *** repr failed: %s ***' % (name,))
TypeError: not enough arguments for format string
At least, I expect pdb to not crash, but a clearer error (as in the patch) is nice to have. |
|
| Date |
User |
Action |
Args |
| 2014-03-12 08:16:21 | jneb | set | recipients:
+ jneb, r.david.murray |
| 2014-03-12 08:16:21 | jneb | set | messageid: <1394612181.76.0.242339738867.issue20853@psf.upfronthosting.co.za> |
| 2014-03-12 08:16:21 | jneb | link | issue20853 messages |
| 2014-03-12 08:16:21 | jneb | create | |
|