setting variables in pdb
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. -- http://mail.python.org/mailman/listinfo/python-list
Re: setting variables in pdb
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: setting variables in pdb
Art grenan...@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 -- http://mail.python.org/mailman/listinfo/python-list