Re: [Pyobjc-dev] Structs, tuples and instances
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-10-30 16:08:54
|
On Oct 30, 2003, at 10:34, Ronald Oussoren wrote: > On 30 okt 2003, at 12:02, Dinu Gherman wrote: > >> Ronald Oussoren: >> >>> I noticed that too :-( Bob introduced a Python2.3-ism when he added >>> support for OpenGL. It works with Python 2.3 and after my next >>> checkin >>> it will also work with 2.2 again. >> >> Thanks, please let us know when it should work again! > > I've just checked in some fixes, including the one mentioned above. Yeah, sorry about that. I intended to fix it myself, but I didn't think that many people were still using 2.2 so I figured it'd be ok for a day or two. Why haven't you upgraded to 2.3, Dinu? Also, back to the NSPoint thing.. how come you don't just use a list subclass? Just put x and y descriptors on it: class NSPoint(list): def __init__(self, v=(0., 0.)): list.__init__(self, v) assert len(self) == 2 x = property(lambda s:s[0], lambda s,v: s.__setitem__(0,v)) y = property(lambda s:s[1], lambda s,v: s.__setitem__(1,v)) -bob |