Python Metalanguage confusticates and bebothers me...
charleshixsn at earthlink.net
Tue Sep 12 18:33:52 CEST 2000
Alex Martelli wrote:
> "Stephen Hansen" <stephen at cerebralmaelstrom.com> wrote in message
> news:20000906.222838.20887 at Jeremy.cerebralmaelstrom.com...
> > 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?!)
And if one is using BerkeleyDB, 5 kinds of arrays, one disk based. (If
sorted/keyed lists could be included as a basic type, then one could have
something rather like a sliceable dictionary. e.g.: bingo = card
-- (c) Charles Hixson
-- Addition of advertisements or hyperlinks to products specifically
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 153 bytes
Desc: Card for Charles Hixson
More information about the Python-list