Re: [Zope3-dev] Re: Build problem
Ruslan Spivak wrote: I think Dmitry used that because of slice assignment and i don't see how it can be done with index assignment of insert(): Yes, definitely. -- Dmitry Vasiliev (dima at hlabs.spb.ru) http://hlabs.spb.ru ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: Build problem
Ruslan Spivak wrote: I think Dmitry used that because of slice assignment and i don't see how it can be done with index assignment of insert(): Indeed! I was thinking of a single item instead of a list. We could use a loop, but I don't think that's any better. Thanks for the clarification. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: Build problem
Benji York <[EMAIL PROTECTED]> writes: > Fred Drake wrote: >> On 9/2/05, Dmitry Vasiliev <[EMAIL PROTECTED]> wrote: >> I now agree that the change is reasonable. It needs a comment that >> it's protecting against importing *installed* versions of ZConfig. > > It would also be nice if it used .insert() instead of a [:0] slice. Hello, Benji. I think Dmitry used that because of slice assignment and i don't see how it can be done with index assignment of insert(): >>> lst = [1, 2, 3] >>> lst[:0] = [8, 9] >>> lst [8, 9, 1, 2, 3] >>> lst = [1, 2, 3] >>> lst.insert(0, [8, 9]) >>> lst [[8, 9], 1, 2, 3] Regards, Ruslan ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com