Message213217
I am not good at this. Sorry for the mess.
Here is a good example, and a good patch:
>>> class foo:
... def __init__(self):
... foo.bar = "hello"
... def __repr__(self): return foo.bar
...
>>> pdb.runcall(foo)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'pdb' is not defined
>>> import pdb
>>> pdb.runcall(foo)
> <stdin>(3)__init__()
(Pdb) a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python33\lib\pdb.py", line 1577, 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 "C:\Python33\lib\pdb.py", line 266, in user_line
self.interaction(frame, None)
File "C:\Python33\lib\pdb.py", line 345, in interaction
self._cmdloop()
File "C:\Python33\lib\pdb.py", line 318, in _cmdloop
self.cmdloop()
File "C:\Python33\lib\cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "C:\Python33\lib\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 "C:\Python33\lib\pdb.py", line 1131, in do_args
self.message('%s = %r' % (name, dict[name]))
File "<stdin>", line 4, in __repr__
AttributeError: type object 'foo' has no attribute 'bar' |
|
| Date |
User |
Action |
Args |
| 2014-03-12 08:22:57 | jneb | set | recipients:
+ jneb, r.david.murray |
| 2014-03-12 08:22:57 | jneb | set | messageid: <1394612577.09.0.410125688784.issue20853@psf.upfronthosting.co.za> |
| 2014-03-12 08:22:57 | jneb | link | issue20853 messages |
| 2014-03-12 08:22:57 | jneb | create | |
|