Do you think that a feature like swap(x,y) literally only works on two simple variables? X and y represent any two lvalue expressions. For example, a[I] and a[I+1]. Python will evaluate each twice.
My version sets up two references then exchanges what they point to with one bytecode. -- Bart -- https://mail.python.org/mailman/listinfo/python-list