The cpython implementation stores tuples in memory like this:
    [common fields for all Python objects]
    [common fields for all variable-size python objects, including tuple size]
    [fields specific to tuple objects, if any]
    [array of PyObject*, one for each item in the tuple]
This way of storing variable-size Python objects was chosen in part
because it reuqires only one allocation for an object, not two.
However, there is no way for one tuple to point to a slice of another
tuple.

there's no reason that some other python implementation couldn't make a
different choice.

Jeff

Attachment: pgpEIrkTKSDkC.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to