Re: [Pyobjc-dev] Re: Making List<->Array bridging transparent
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2002-11-10 18:03:50
|
On Saturday, Nov 9, 2002, at 20:13 Europe/Amsterdam, Peter Montagner wrote: > > On Sunday, November 10, 2002, at 04:10 AM, bb...@ma... wrote: > >> On Saturday, November 9, 2002, at 09:42 AM, Peter Montagner wrote: >>> How is either method going to solve the splice problem if the splice >>> code is trying to access the list directly? Did I understand that >>> correctly? >> >> Python has been moving to using the types-- string, int, etc..-- as >> inheritable classes for some time. As such, you can do things like: >> > [snip] >> >> Or something like that... I haven't fully wrapped my head around this >> stuff yet. > > OK. Maybe I misunderstood. I'm think I'm clear now. So what you're > saying is that the splice code will work for any list, although just > implementing the methods is not enough? Just in case someone missed my other messages on this subject: List slice assignment will work when the source is not a python list object if and only if you use a recent snapshot of Python 2.3. In Python 2.2 this will not work correctly, even if the object is an instance of a subclass of __builtin__.list. Ronald |