Python Metalanguage confusticates and bebothers me...

Alex Martelli aleaxit at yahoo.com
Thu Sep 7 03:51:51 EDT 2000


"Stephen Hansen" <stephen at cerebralmaelstrom.com> wrote in message
news:20000906.222838.20887 at Jeremy.cerebralmaelstrom.com...
    [snip]
> You see, Python has three kinds of arrays. To make things easier
> to understand, they are each called something distinct, and not
> 'immutable arrays', 'mutable dynamic-lengthed arrays' and
> 'associative arrays'. They're 'tuples', 'lists', and 'dictionaries'.

3 kinds of arrays: tuples, lists, dictionaries, and the nice
little thing that comes up when you "import array"...:

>>> import array
>>> x=array.array('c',"foo")
>>> type(x)
<type 'array'>
>>>

Uh -- *four* kind of arrays, at least until NumPy and MatPy
stay out of the language proper... so, it's 4 kinds of arrays:
tuples, lists, dictionaries, arrays, and of course strings
are sequences and can be seen as arrays of charactes, so,
*five* kinds of arrays...

(Nobody expects the WHAT?!)


Alex






More information about the Python-list mailing list