[Tutor] subclassing strings
Kent Johnson
kent37 at tds.net
Wed Jan 9 05:05:59 CET 2008
Tiger12506 wrote:
> PS. Anyone who's interested. A significant study of C has brought me to
> these conclusions.
> immutable -> implemented with static buffer
> mutable -> implemented with linked list
> Anyone know a little more detail?
Certainly not true of Python. I don't know of any standard Python data
structure that is implemented with a linked list. list is implemented as
an array of references, not a linked list. dict and set are hash tables.
User-defined classes are implemented however you like, with a dict to
hold the attributes.
Kent
More information about the Tutor
mailing list