Re: lists <-> tuple

2005-11-05 Thread Peter Notebaert
"Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Peter Notebaert wrote: >> I am new to Python and have to create an import library in C that uses >> matrices. >> >> These matrices can be one-dimensional (vectors) or two-dimensional. If I >> look in the ActivePython 2.4

Re: lists <-> tuple

2005-11-05 Thread Peter Notebaert
"Jim" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Tuples or lists for matrix-like functionality? > > Use lists. Tuples are meant for small immutable sets of things that go > together. Lists are more like arrays, and you can assign to one > existing element if you want. > > On

Re: lists <-> tuple

2005-11-02 Thread Robert Kern
Peter Notebaert wrote: > I am new to Python and have to create an import library in C that uses > matrices. > > These matrices can be one-dimensional (vectors) or two-dimensional. If I > look in the ActivePython 2.4 documentation at data structures, then I see at > least 2 posibilities to repre

Re: lists <-> tuple

2005-11-02 Thread Jim
> Tuples or lists for matrix-like functionality? Use lists. Tuples are meant for small immutable sets of things that go together. Lists are more like arrays, and you can assign to one existing element if you want. One exception, is a short vector is often a tuple like (x, y, z) and you might wa