List problems in C code ported to Python

Grant Edwards grante at visi.com
Mon Jan 17 11:52:08 EST 2005


On 2005-01-17, Lucas Raab <pythongnome at hotmail.com> wrote:

>      data[4][j] = ((int)ref_rotor[j]-'A'+26)%26;


> 		data[4],[j] = (ref_rotor[j] - 'A'+26) % 26
                       ^
The comma shouldn't be there.

     C:     data[4][j]
Python:     data[4][j]

> Now, do I need to start boning up on lists and how to use them

Sort of.  I think you mostly just need to sit down and
proofread your code.

I would also advise building your Python app in smaller steps.
Translate one function, and test it to make sure it works. Then
translate the next function and test it to make sure it works.
Then the next function, etc.

-- 
Grant Edwards                   grante             Yow!  My ELBOW is a remote
                                  at               FRENCH OUTPOST!!
                               visi.com            



More information about the Python-list mailing list