Re: [Pyobjc-dev] Re: Structs, tuples and instances
Brought to you by:
ronaldoussoren
From: Dinu G. <gh...@da...> - 2003-11-04 10:45:11
|
Ronald Oussoren: > I agree that immutability isn't very usefull, but it buys you one > important feature: structseqs are useable as keys in dictionaries. How much is that worth when dealing with elements which actually *are* and *should be* mutable? > Does anyone use points, rects or sizes as the key in a dictionary? My point of view is that doing this is a *bad idea* and the fact that you can do it now introduces a source of confusion because it advocates usage patterns in PyObjC which are not just some kind of a more Pythonic way of doing something, but introduce artificial and unnecessary differences between PyObjC and ObjC on a conceptual level, which must be something to minimize if technically possible. Dinu -- Dinu C. Gherman - http://python.net/~gherman ...................................................................... "The whole point of brainwashing, is that those being brainwashed don't know it." (Graham Haley) |