Embedding Python in C

mistabean at gmail.com mistabean at gmail.com
Wed Jun 6 07:48:04 EDT 2007


On 6 Jun., 05:44, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:

> Python lists and tuples are "generic" containers: both can contain any  
> kind of object, and each item may be of a different type: (1, 2.0, 3+0j,  
> "four", u"Fünf", file("six")) is a tuple containing 6 items, all of  
> different types. Tuples are immutable, lists can be modified.
> There is a price for such flexibility: memory and time overhead. When you  
> don't require flexibility, you don't have to pay the price; Python already  
> provides simple array objects (a flat container where ALL items are of the  
> same type) and Numeric&Co support more array types and different floating  
> point numbers.
> Those arrays are not the same thing as lists/tuples - altough they share a  
> very similar interfase.
>
> --
> Gabriel Genellina

Hmmmm, interesting to know that multi-type...errr... "thingys" can be
packed into one tuple or list. I think my problem of not recognizing
what array is what type will be solved in time *hopefully*.

"Joe Riopel" wrote:
>This seems like a pretty good resource, although I didn't read it all yet:
>http://www.ibm.com/developerworks/edu/l-dw-linux-pythonscript-i.html

Thanks for the link. Every resource is useful, in one way or another.








More information about the Python-list mailing list