Bart wrote:
a[1],b[fn()] = b[fn()],a[1]

I suppose if you find yourself doing heaps of swaps with
complicated indexes it could be useful to have a swap
primitive. In my experience it's a pretty rare thing to
want to do, though.

Also it only covers one special case of all possible
permutations. It won't help you with a, b, c = b, c, a
for example.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to