2010/5/2 spir ☣ <denis.s...@gmail.com>: > Hello, > > Is there anywhere some introduction material to the implementation of python > lists (or to fully dynamic and flexible sequences, in general)? > More precisely, I'd like to know what kind of base data-structure is used > (linked list, dynamic array, something else -- and in case of array, how is > resizing computed). Also, how is "generics" (element are of free type, and > even heterogeneous) managed?
There's no distinction between the types, a list is just a list of Objects, and they can be anything, they can be lists themselves, or a primitive data type like an int (which is still an Object in Python), or whatever. Remember everything in Python inherits from the generic class 'object' or it inherits from a class that inherits from 'object'. I have no idea what the implementation actually is, but I have read about it somewhere so I do know that it's possible to find the implementation details. Good luck, -Luke _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor