On Mon, 17 Jan 2005 15:28:56 GMT, Lucas Raab <[EMAIL PROTECTED]> wrote:
>Lucas Raab wrote:
>> I'm done porting the C code, but now when running the script I
>> continually run into problems with lists. I tried appending and
>> extending the lists, but with no avail. Any help is much appreciated
On 2005-01-17, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
l = []
for i in range(2):
> for j in range(2):
> l[i][j] = 'x'
>
>
>
> Traceback (most recent call last):
> File "", line 3, in -toplevel-
> l[i][j] = 'x'
> IndexError: list index out of range
>
> So you still have to dimension t
>>> l = []
>>> for i in range(2):
for j in range(2):
l[i][j] = 'x'
Traceback (most recent call last):
File "", line 3, in -toplevel-
l[i][j] = 'x'
IndexError: list index out of range
So you still have to dimension the list before you can use it , eg like
>l = []
>for i in range(2):
>l.appen
On 2005-01-17, Lucas Raab <[EMAIL PROTECTED]> 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 boni
l = []
for i in range(2):
for j in range(2):
l[i],[j] = 0
print l
gives
Traceback (most recent call last):
File "C:\TEMP\test.py", line 75, in -toplevel-
l[i],[j] = 0
TypeError: unpack non-sequence
That's why your current code needs a matrix class.
--
http://mail.python.org/mailman/listinfo/pyt
Lucas Raab wrote:
I'm done porting the C code, but now when running the script I
continually run into problems with lists. I tried appending and
extending the lists, but with no avail. Any help is much appreciated
Please see both the Python and C code at
http://home.earthlink.net/~lvraab. The t
On 2005-01-17, Lucas Raab <[EMAIL PROTECTED]> wrote:
> Sorry about that. I had a bad day. First there was the
> migraine and then the fight with my significant other, so
> yesterday was not a good day. I apologize for what I said.
No worries. As somebody else said, the best way to get help
solvi
Lucas Raab wrote:
> I'm done porting the C code, but now when running the script I
> continually run into problems with lists. I tried appending and
> extending the lists, but with no avail. Any help is much appreciated
> Please see both the Python and C code at
> http://home.earthlink.net/~lvraab.
Grant Edwards wrote:
On 2005-01-16, Lucas Raab <[EMAIL PROTECTED]> wrote:
Please see both the Python and C code at
http://home.earthlink.net/~lvraab. The two files are ENIGMA.C
and engima.py
http://www.catb.org/~esr/faqs/smart-questions.html
I didn't expect to get bitched out just because I didn
"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Michael Hoffman wrote:
> > Paul McGuire wrote:
> >> So "A" == 'a' is true in Python, not true in C.
> > I think you meant:
> >
> > >>> "A" == "A"
> > True
>
> Er, "A" == 'A'
> --
> Michael Hoffman
Yeah, that's the on
On 2005-01-16, Lucas Raab <[EMAIL PROTECTED]> wrote:
>>>Please see both the Python and C code at
>>>http://home.earthlink.net/~lvraab. The two files are ENIGMA.C
>>>and engima.py
>>
>> http://www.catb.org/~esr/faqs/smart-questions.html
>
> I didn't expect to get bitched out just because I didn'
Michael Hoffman wrote:
Paul McGuire wrote:
So "A" == 'a' is true in Python, not true in C.
I think you meant:
>>> "A" == "A"
True
Er, "A" == 'A'
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
Lucas Raab wrote:
Grant Edwards wrote:
http://www.catb.org/~esr/faqs/smart-questions.html
I didn't expect to get bitched out just because I didn't follow "protocol."
I didn't see anyone bitch you out. And you were lucky that one
person was kind enough to go through your web site and make some
sug
Paul McGuire wrote:
So "A" == 'a' is true in Python, not true in C.
It's not true in Python either.
You probably meant to say: "a" == 'a'
(lowercase a)
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
Paul McGuire wrote:
So "A" == 'a' is true in Python, not true in C.
>>> "A" == 'a'
False
I think you meant:
>>> "A" == "A"
True
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
"Paul McGuire" <[EMAIL PROTECTED]> wrote:
> "A" == 'a' is true in Python, not true in C.
It could be true in C, if the string is stored in very low memory :-)
--
http://mail.python.org/mailman/listinfo/python-list
"Lucas Raab" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm done porting the C code, but now when running the script I
> continually run into problems with lists. I tried appending and
> extending the lists, but with no avail. Any help is much appreciated
> Please see both the Py
Grant Edwards wrote:
On 2005-01-16, Lucas Raab <[EMAIL PROTECTED]> wrote:
I'm done porting the C code, but now when running the script I
continually run into problems with lists. I tried appending and
extending the lists, but with no avail. Any help is much appreciated
Please see both the Python
Lucas Raab wrote:
Please see both the Python and C code at
http://home.earthlink.net/~lvraab. The two files are ENIGMA.C and engima.py
If you post a small testcase here you are much more likely to get helped.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
On 2005-01-16, Lucas Raab <[EMAIL PROTECTED]> wrote:
> I'm done porting the C code, but now when running the script I
> continually run into problems with lists. I tried appending and
> extending the lists, but with no avail. Any help is much appreciated
> Please see both the Python and C code a
I'm done porting the C code, but now when running the script I
continually run into problems with lists. I tried appending and
extending the lists, but with no avail. Any help is much appreciated
Please see both the Python and C code at
http://home.earthlink.net/~lvraab. The two files are ENIGM
21 matches
Mail list logo