pdb and jump - newbie question

2011-04-14 Thread BiDi
I have been trying to figure out how to use pdb to correct simple errors in a file and then continue with program execution. Perhaps someone can tell me why this is not working for me. Here is my file test.py: #-- import pdb pdb.set_trace() print """ this is a test file """ x =

Re: subclassing complex

2008-08-29 Thread BiDi
On Aug 30, 6:18 am, Patrick Maupin <[EMAIL PROTECTED]> wrote: > On Aug 29, 4:24 am, Peter Otten <[EMAIL PROTECTED]> wrote: > > > > > A minimal example is > > > >>> class Complex(complex): > > > ...     def __radd__(self, other): print "radd" > > ...>>> 1j + Complex() > > > 1j > > > versus > > > >>>

subclassing complex

2008-08-28 Thread BiDi
I have been trying to subclass complex, but I am not able to get the right-hand arithmetic operators working. As shown below, if an object of my subclass 'xcomplex' is added on the right of a 'comlex' object, the type returned is 'complex', not 'xcomplex'. I've tried subclassing float and it work