[plugin] dirstate experiments

Robert Collins robertc at robertcollins.net
Thu Jun 15 17:49:30 BST 2006


On Thu, 2006-06-15 at 18:44 +0200, Wouter van Heyst wrote:
> On Thu, Jun 15, 2006 at 11:02:52AM -0500, John Arbash Meinel wrote:

> > 
> > I wish there was a way of telling the slice operator to break things up
> > into chunks. Like you can do "x,y,z = list[:3]", but you can't do:
> > 'x,y,z = list[1:3,3:6,6:9]'
> 
> lst = list(xrange(9))
> x, y, z = [lst[i:i+3] for i in xrange(0, 7, 3)]

just randomly, you might try:

 x, y, z = (x1, x2), (y1, y2, y3), (z1, z2, z3) = list[1:9]

No idea if it will play...
-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060616/ad32ec6c/attachment.pgp 


More information about the bazaar mailing list