Prev: upgrade python
Next: how to cause a request for a missing class attribute cause its calculation
From: Art on 18 May 2010 16:15 If I am in Pdb, I would like to set a temporary variable, for example: (Pdb) r = 1 The 'r' gets interpreted as 'return' by Pdb. Is there a Pdb instruction that guarantees the intended effect, like: (Pdb) let r = 1 I can usually avoid using such variable names, but if I am changing the value of a local variable, it is convenient to be able to make sure that trying to change that variable doesn't unintentionally call a Pdb routine. Thanks, Art.
From: John Posner on 18 May 2010 16:32 On 5/18/2010 4:15 PM, Art wrote: > If I am in Pdb, I would like to set a temporary variable, for example: > > (Pdb) r = 1 > > The 'r' gets interpreted as 'return' by Pdb. > > Is there a Pdb instruction that guarantees the intended effect, like: > > (Pdb) let r = 1 > > I can usually avoid using such variable names, but if I am changing > the value of a local variable, it is convenient to be able to make > sure that trying to change that variable doesn't unintentionally call > a Pdb routine. Try setting *two* values at the interactive prompt: foo, r = 0, 3456 Variable "r" now has the value 3456. HTH, John
From: Duncan Booth on 18 May 2010 16:33 Art <grenander(a)gmail.com> wrote: > If I am in Pdb, I would like to set a temporary variable, for example: > > (Pdb) r = 1 > > The 'r' gets interpreted as 'return' by Pdb. > > Is there a Pdb instruction that guarantees the intended effect, like: > > (Pdb) let r = 1 (Pdb) exec "r=1"
|
Pages: 1 Prev: upgrade python Next: how to cause a request for a missing class attribute cause its calculation |