Tuple Format?

Rainer Deyke root at rainerdeyke.com
Tue Sep 5 14:52:46 EDT 2000


"Delaney, Timothy" <tdelaney at avaya.com> wrote in message
news:D133051DBC4AD111B90800A0C9694983019DDC7A at natasha.auslabs.lucent.com...
> I do like the idea of adding constness (I prefer the term immutability) in
a
> general way to objects. This would enforce that only __getattr__,
> __getslice__ etc could be called. There could be no assignment to instance
> properties. etc etc etc ... sorry - bit slow right now ... just finished a
> 13-hour day on 3 hours sleep.

It would probably have to be a bit more complicated so get_something methods
still work.  I recommend an exception be thrown if a const object's __dict__
is modified (considering only class instances for now).


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list