I asked a question and from the ensuing discussion, it emerges that the
present Pythonic way - of distinguishing among immutable Tuples and
mutable Lists, and providing each with its own syntactical notation - is
fine as is.

The following ideas emerged from the discussion:

1. It would be nice to have an immutable Dict data type, which can be
used as Dict key.

2. It may be nice to explore the concept of different kinds of
references to the same object.  While mutable-expecting references vs.
immutable-expecting references are not useful concepts, the idea of
different kinds of references may be an useful metaphor for controlling
access to values in multi-threaded applications.

3. It is useful to be able to create a value of a mutable class, and
after a while - freeze it i.e. make it a value of the corresponding
immutable class.
For example, if your application needs to create a long Tuple (say, as a
1000-element Tuple serving as a Dict key) and prefers to create it
element by element, then it creates a List and once finished building
the List up, the List is converted into a Tuple.

                                                 --- Omer
-- 
Delay is the deadliest form of denial.    C. Northcote Parkinson
My own blog is at http://www.zak.co.il/tddpirate/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html

_______________________________________________
Python-il mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il

לענות