Tuples cf. Expanded objects??

William Tanksley wtanksle at dolphin.openprojects.net
Fri Jul 2 12:58:37 EDT 1999


On Fri, 02 Jul 1999 22:10:46 +1000, Gary Stephenson wrote:

>> There is probably something in the the FAQ.  BAsically, tuples are stored
>> more compactly and can be used as dictionary keys (because they ARE
>> readonly).

>How similar are Python's "Immutable Tuples" to Eiffel's "Expanded
>objects".  If one was to try to implement immutable tuples in another
>language, would an "expanded objects" implementation be the best, or even
>appropriate?

No similarity.  Expanded objects are objects which are handled by value
rather than reference.  Immutable types (which include tuples) are types
whose dimensions cannot change.

An instance of an immutable type may be created in expanded form.

>gary

-- 
-William "Billy" Tanksley




More information about the Python-list mailing list