curly-brace-aphobic?
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Tue Jan 30 14:22:04 EST 2001
Mon, 29 Jan 2001 12:30:30 -0500, D-Man <dsh8290 at rit.edu> pisze:
> I'm not sure how different they are conceptually. A dictionary is a
> collection (sequence) of data that is indexed by arbitrary keys. A
> list is a collection (sequence) of data that is indexed by integers
> only. It seems to me that a list is a special case of a dictionary.
An important difference is that in a sequence you can insert or
delete in the middle *shifting indices of all following elements*,
where in a dictionary such operation would not make sense.
Of course it does not imply that I would make a difference in syntax
of accessing elements. When dictionaries and sequences are treated
as immutable, they are very similar.
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
More information about the Python-list
mailing list