Re: [Pyobjc-dev] Structs, tuples and instances
Brought to you by:
ronaldoussoren
From: Jack J. <Jac...@cw...> - 2003-10-31 10:54:40
|
On 30 Oct 2003, at 10:36, Dinu Gherman wrote: > Hi, > > I'm trying to fake some kind of a solution which is more struct-like > than plain Python tuples for things like NSPoint, NSSize, etc. Here's > a simple one: > > class NSPoint: I don't have a real reason for it, but my gut feeling is that the Pythonic way to do this is the other way around: use a list as the baseclass, and subclass that. Actually, what you really want (I think) is something based on structmember, but I don't know whether that allows read/write access, and whether it's available from Python code. Hmm, even if it isn't available from Python the objc core could make it available. Using structmember for the various toolbox structures is something that's also on my to-do list, but I haven't done anything about it yet so I don't know how feasible this approach is. -- Jack Jansen <Jac...@cw...> http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman |