setting variables in pdb

A

Art

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.
 
J

John Posner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top